Skip to content
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

Bug: [new config system] Directories cannot be unignored #16415

Closed
1 task
Tracked by #13481
mdjermanovic opened this issue Oct 12, 2022 · 0 comments · Fixed by #16422
Closed
1 task
Tracked by #13481

Bug: [new config system] Directories cannot be unignored #16415

mdjermanovic opened this issue Oct 12, 2022 · 0 comments · Fixed by #16422
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed This issue should include a reproducible example

Comments

@mdjermanovic
Copy link
Member

Environment

Node version: v16.14.0
npm version: v8.3.1
Local ESLint version: main branch
Global ESLint version: Not found
Operating System: win32 10.0.19044

What parser are you using?

Default (Espree)

What did you do?

my-app/
├── eslint.config.js
└── foo/
    └── bar/
        └── a.js
// eslint.config.js
module.exports = [{
    ignores: [
      "foo/*",
      "!foo/bar"
    ]
}];

Command:

eslint "foo/**/*.js" -f tap

What did you expect to happen?

I would expect foo/bar/a.js to be linted, because neither the file itself nor any of its parent directories are ignored by the patterns.

TAP version 13
1..1
ok 1 - D:\tmp\my-app\foo\bar\a.js

What actually happened?

Oops! Something went wrong! :(

ESLint: 8.25.0

You are linting "foo/**/*.js", but all of the files matching the glob pattern "foo/**/*.js" are ignored.

If you don't want to lint these files, remove the pattern "foo/**/*.js" from the list of arguments passed to ESLint.

If you do want to lint these files, try the following solutions:

* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly repro:needed This issue should include a reproducible example labels Oct 12, 2022
@nzakas nzakas mentioned this issue Oct 13, 2022
69 tasks
@nzakas nzakas added the accepted There is consensus among the team that this change meets the criteria for inclusion label Oct 13, 2022
nzakas added a commit that referenced this issue Oct 13, 2022
Upgrade @humanwhocodes/config-array to fix several issues.

Fixes #16416
Fixes #16415
mdjermanovic pushed a commit that referenced this issue Oct 13, 2022
)

Upgrade @humanwhocodes/config-array to fix several issues.

Fixes #16416
Fixes #16415
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Apr 12, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly repro:needed This issue should include a reproducible example
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants