-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Bug: [new config system] Patterns cannot re-ignore #16416
Copy link
Copy link
Closed
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyrepro:neededThis issue should include a reproducible exampleThis issue should include a reproducible example
Description
Activity
Metadata
Metadata
Assignees
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyrepro:neededThis issue should include a reproducible exampleThis issue should include a reproducible example
Type
Projects
- StatusShow more project fieldsComplete
Environment
Node version: v16.14.0
npm version: v8.3.1
Local ESLint version:
mainbranchGlobal ESLint version: Not found
Operating System: win32 10.0.19044
What parser are you using?
Default (Espree)
What did you do?
Command:
What did you expect to happen?
I'd expect
a.jsto be ignored. It should be possible to re-ignore previously unignored files. In other words, the last pattern that matches the file should determine whether the file is ignored: if it's non-negative then the file is ignored, if it's negative then the file is not ignored,(unless the file is in an ignored directory, in which case the file is ignored regardless of patterns that match the file itself).
What actually happened?
Participation
Additional comments
The same applies to directories. I believe that the code that determines whether a directory is ignored should be the same as the code that determines whether a file is ignored by ignore patterns, except that we should make sure that the directory path ends with a
/so that it can match with patterns that end with/.