Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Negated ignore pattern doesn't work when file previously ignored with '**' rule #5979
What version of ESLint are you using?
What parser (default, Babel-ESLint, etc.) are you using?
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
What actually happened?
This bug seems to happen only when the
@jsnajdr Maybe you meant this?
I tested this and it also works now :)
In your previous example, note
But this means that I can't put a whole source directory into
Such a use case doesn't exist in Git - nobody probably needs to cherry-pick files deep inside an ignored tree and add them to version control - but it's useful for ESLint. So maybe having exactly the same semantics as
Seems I'll have to workaround this by ignoring the
Yes, I am afraid you'll have to especify the extension so folders don't get ignored or do this:
I agree it's not ideal, but we use
referenced this issue
Apr 28, 2016
It is a good thought.
But guys are using
The key question is that whether we should follow the "It is not possible to re-include a file if a parent directory of that file is excluded." of the
Or we might as well add a new command line option to provide a different behavior of the ignoring system.
But what we are discussing about might be another issue, however :)
We recently switched our ignore processing from