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
Docs: (flat config) improve global ignores documentation #17822
Comments
ignores
is un-ignored by files
Hmmm. Re-reading the docs a bit more - it looks like the So the correct form of the ignore is instead So this isn't a bug - it's instead (imo) unclear documentation thing. This section probably needs another pass to help clarify the usage. |
In global ignores, patterns match directories too, so |
I also think it would be good to improve this section and migration guide. |
ignores
is un-ignored by files
@mdjermanovic i didn't know there was a migration guide - is it linked from the new config docs? I didn't see it when searching the page. |
Let's hold off until we merge the new docs: We already have too many big changes happening to docs and I don't want to have to update them all again. |
Working on this. |
* docs: Improve flat config ignores docs fixes #17822 * Fix links
Environment
Node version: v18.16.1
npm version: v9.5.0
Local ESLint version: v8.55.0 (Currently used)
Global ESLint version: Not found
Operating System: darwin 23.1.0
What parser are you using?
Default (Espree)
What did you do?
What did you expect to happen?
Given the folder structure:
I would expect that running
eslint src
would lintsrc/not-ignored.js
and would skipsrc/dist/not-ignored.js
.What actually happened?
Both files do get linted
Link to Minimal Reproducible Example
https://github.com/bradzacher/eslint-flat-config-bugs/tree/main/not-ignored-bug
Participation
Additional comments
probably relevant DEBUG=* output
It looks like the
src/dist/ignored.js
file gets ignored then unignored by thefiles
glob.This is contrary to what I'd expect based on the docs that state that
I wouldn't expect that I can implicilty unignore a file by simply adding it to a
files
- I'd expect that I'd need to explicitly unignore it egignores: ['!src/dist/ignored.js']
The text was updated successfully, but these errors were encountered: