-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix: ignore files on a different drive on Windows #19069
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
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
@eslint/config-array
to v0.19.xit("should allow setting the filename to a file path without extension", () => { | ||
ruleTester.run("", require("../../fixtures/testers/rule-tester/no-test-filename"), { | ||
valid: [ | ||
{ | ||
code: "var foo = 'bar'", | ||
filename: "somefile" | ||
}, | ||
{ | ||
code: "var foo = 'bar'", | ||
filename: "path/to/somefile" | ||
} | ||
], | ||
invalid: [] | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I integrated this test into another one with the same title further below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! Would like @nzakas to verify before merging.
let otherDriveLetter; | ||
const exec = util.promisify(require("node:child_process").exec); | ||
|
||
before(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment here explaining what's happening? I'm not quite sure I get it now, and I'm sure in another year I'll have no idea. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments in 31938be. Hope it's clearer now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Update a dependency
fixes #18575
What changes did you make? (Give an overview)
This PR updates
@eslint/config-array
to version^0.19.0
and adds unit tests to check that files on different drives are correctly ignored on Windows, which closes #18575.The changes in
lib/eslint/eslint-helpers.js
remove unused logic that is probably a leftover of previous refactorings and is not necessary when paths (including glob patterns) are resolved to absolute paths. The changes inRuleTester
should not be user-facing.Is there anything you'd like reviewers to focus on?
Am I missing any unit tests?