-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the opposite of eslintignore ("files" field) #5893
Comments
The reason it's slow currently is that ignore patterns do not affect globing. So while files under your node_modules directory is not going to be linted, they are still being walked though when we are opening globs. There's already an open issue tracking this: #5679 |
Oh, that's interesting. So I am tracking this issue. Thanks for the explanation. Should I close this one then? |
I think it's safe to close, since #5679 is already tracking the same problem. |
From what I am reading in the docs (http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories) there is currently only a wait to ignore files, but nothing like npm files to include the files you want from the config file.
Another example is the AVA test runner that offers a "files" field so we can choose what to test https://github.com/sindresorhus/ava#configuration
Currently I have a project with multiples node_modules folder, in multiples folders (https://github.com/MoOx/phenomic) and when I lint with the proper ignore pattern (currently, my gitignore file), it takes around 20s.
By providing only the accurate places, I cut the time to 5s.
But the command is pretty long
$ eslint src __tests__ scripts npm docs/scripts docs/src docs/web_modules boilerplate/scripts boilerplate/src boilerplate/web_modules
What do you think about adding a "files" field in the configuration object to put all entries here, like npm and AVA (and probably others)?
(I took a quick look for opened issue, but can't find anything about that, sorry if I miss something.)
The text was updated successfully, but these errors were encountered: