Change Request: Dissable errors for directories with files that are all unsupported.
See original GitHub issueESLint version
v8.5.0
What problem do you want to solve?
Currently there are some directories which are empty, or contain files that are not supported by ESLint (e.g. different language than JS/TS); when ESLint encounters one of these directories, it throws an error and exits with a non-zero exit code. I would expect that the --no-error-on-unmatched-pattern
CLI option would disable this or adding that pattern to .eslintignore
, it doesn’t. (Slightly Important) Context: This is a mono-repo with many different projects in the repo-root/packages/
directory. I would like all JS/TS files in these to be linted (after being formatted by Prettier, which is working as expected) despite them containing other types of files (like .rs
, .go
, .py
, etc) which aren’t supported by ESLint (as far as I know) and they have their own linters.
What do you think is the correct solution?
I get that this might be an issue for some, but I’d like a way to turn this specific error off; either through a CLI switch, or a configuration option in .eslintrc.*
. Or just make ESLint a bit more “lenient” like Prettier (e.g. doesn’t complain about unsupported files).
Participation
- I am willing to submit a pull request for this change.
Additional comments
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi @Reboot-Codes, thanks for the issue!
How did you run ESLint, and what error did you get?
--no-error-on-unmatched-pattern
should prevent errors for unmatched patterns and patterns that match only ignored files.Weird, well, looks like I’ll have to go fix prettier then, thank you for your help!