-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived 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:yesIssues with a reproducible exampleIssues with a reproducible example
Description
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"]
}];
Command 1:
eslint "foo/**/*.js" -f tap
Command 2:
cd foo && eslint "bar/**/*.js" -f tap
Command 3:
eslint foo/bar/a.js -f tap
What did you expect to happen?
All three commands should treat the foo/bar/a.js
file as an ignored file, because it is under the ignored directory foo
.
What actually happened?
Command 1:
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.
Command 2:
TAP version 13
1..1
ok 1 - D:\tmp\my-app\foo\bar\a.js
Command 3:
TAP version 13
1..1
ok 1 - D:\tmp\my-app\foo\bar\a.js
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived 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:yesIssues with a reproducible exampleIssues with a reproducible example
Type
Projects
Status
Complete