Created by: rricard
Should fix #1169 (closed).
Why would I do that?
Right now CRA checks lint (and soon flow) errors through a webpack compilation process (for example, eslint checks are based on a loader). The issue with this is, this will not check non-imported files in the main app such as tests.
How does this PR solves the problem?
This PR adds files matching a certain "glob" pattern (representing the tests) to the list of watched webpack files as well as triggering an independent child compilation (like html-webpack-plugin does) for those files that will open and process the contents of the files through the available loaders (including eslint) to output them in a tmp dir.
test
script?
Shouldn't we add this to the Doing so would require to add a new way to run eslint on top of the jest watcher. I don't even know if that's possible, however webpack plugins are perfect for this kind of thing!