Repository navigation
fix: ignore files on a different drive on Windows - #19069
Merged
Merged
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
@eslint/config-array to v0.19.x
fasttime
commented
Nov 4, 2024
Comment on lines
-1335
to
-1350
| it("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: [] | ||
| }); | ||
| }); | ||
|
|
Member
Author
There was a problem hiding this comment.
I integrated this test into another one with the same title further below.
mdjermanovic
reviewed
Nov 4, 2024
mdjermanovic
previously approved these changes
Nov 5, 2024
mdjermanovic
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks! Would like @nzakas to verify before merging.
nzakas
reviewed
Nov 5, 2024
| let otherDriveLetter; | ||
| const exec = util.promisify(require("node:child_process").exec); | ||
|
|
||
| before(async () => { |
Member
There was a problem hiding this comment.
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. 😄
Member
Author
There was a problem hiding this comment.
I added comments in 31938be. Hope it's clearer now.
mdjermanovic
approved these changes
Nov 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-arrayto version^0.19.0and 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.jsremove 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 inRuleTestershould not be user-facing.Is there anything you'd like reviewers to focus on?
Am I missing any unit tests?