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
eslint scans all dotfiles, even in ignored folders #9470
Comments
I stumbled on this problem in eslint/eslint#14158 |
I think @chancancode / @wagenet just recently fixed this. Mind taking a look? |
Oh nice! The re-ignoring of dot-directories in #9456 does solve most of the issue (and indeed, the problem I was having) I don't think it would fix the problem of dotfiles inside ignored folders being scanned. Say if a file like Happy for this to be closed though if you think that's an edge-case |
Can you confirm that is still an issue (dotfiles with or without extension within an ignored directory still get detected and linted)? It seems odd that ignored directories would be traversed at all in. |
Looks like you're right. To test this I made my .eslintignore config match the one in the PR, added a file I think the work in the PR above is sufficient 👍 thanks! |
I think there's a slight misconfiguration in the default
.eslintignore
fileHere's an example of it
https://github.com/ember-cli/ember-new-output/blob/7faae3f8d1c029efb0e47664d5ef232a9ef912ac/.eslintignore#L1-L21
Focusing on the
!.*
introduced by #8070This causes it to scan all dot-files and dot-directories, even in the ignored directories listed above it (dist, tmp, vendor, node_modules, ...). It unignores them, I don't think this was the intent when it was added.
One solution is moving that line to the top of the file, but then it will still unignore dotfiles in default eslint ignored directories (like
**/node_modules/*
or whatever else they might decide to add in the future)I think a better solution would be better targeting for the
!.*
- assuming the intent was just to target dotfiles in the top directory, maybe something like this is enough ->./!.*
The text was updated successfully, but these errors were encountered: