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
.eslintignore does not filter hidden files #1077
Comments
I've managed to filter those files with this kludge: |
We could fix this (if we want) by setting the "dot" option on minimatch. |
I think, it's a bug. Also, ignoring dot folders is a good way to get some speed, because |
Whether we ignore dot folders or not is a separate issue - minimatch needs to treat them however our traversal treats them. If anything it should be less restrictive. |
I think we should just make sure the traversal skips them. |
Hm... is it a good idea to hardcode skipping IMHO, it's better to make ingnores work exactly as in other popular programs, instead of doing something custom. |
In this case, our closest precedent is jshint, which also ignores dot files. |
@puzrin I thought you were saying we should always ignore dot files and directories because that's the way other programs work? |
@nzakas i meaned opposite - no reasons to ignore by default. May be, i didn't understood right your previous answer. @jrajav I didn't knew it. Seriously. Meaned git, npm and so on. Jshint is "better than nothing", but i'm not sure it worth copy everything from it. |
The difference is that git and npm manage files and directories in general. It makes sense for them to preserve everything with few questions asked. On the other hand, JSHint and ESLint are specialized tools - they act on JavaScript source code, and can be a lot more selective about what files they'll see during implicit directory traversal. It makes sense to ignore dot files and dot directories when they're not passed explicitly, because normally those are not a part of the primary source code but only accessory to it. |
We can't be sure, what is primary and what is not. Anyway, i think, the root of problem is that scan/ignore alrogythm is reinvented from scratch, and |
Let's not overcomplicate the problem. JSHint ignores dot-directories (it basically does an |
No problem, i'll be fine with any kind of fix. |
I still get errors for
node_modules/less/.grunt/grunt-contrib-jasmine/boot.js
and similar. Other files fromnode-modules
folder are ignored ok.The text was updated successfully, but these errors were encountered: