-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
The version of ESLint you are using.
ESLint: 5.1.0.
The problem you want to solve.
Since breaking behaviour change 8b7c6ea #7390 #10143 bundled in ESLint 5, a fatal error is thrown if any file pattern return no files.
My company is using a generic ESLint configuration/runner for all our projects, and we are pretty happy with that:
eslint \
--ext .js --ext .jsx --ext .mjs \
-- src test "packages/*/src" "package/*/test"The problem is that not ALL of our projects matches the same patterns, and we got this error since we upgraded to eslint@5
No files matching the pattern "test" were found.
Please check for typing mistakes in the pattern.
We don't want to implement custom code to check for pattern existence before appending them to eslint CLI parameters (and we where really happy with eslint@4 behaviour on this particular case).
NOTE: This issue is a bit related to #9977
Your take on the correct solution to problem.
Add a CLI option (exactly like how proposed here) not to throw errors on unmatched patterns.
Something like --no-error-on-missing-files or --no-error-on-unmatched-pattern