-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
refactor: switch to @eslint/config-array
#18527
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
if (!config) { | ||
return void 0; | ||
} |
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.
This check is the same as if (ignored)
on line 874. ignored
is true
whenever a file has no config, even if it's not ignored by a pattern.
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.
Yeah, I also think that at this point it can't happen that filePath doesn't have config, so it seems safe to remove. This is probably a leftover from some earlier implementations.
7c49a95
to
77c740d
Compare
@eslint/config-array
@eslint/config-array
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!
Note: since the browser test is still failing due to technical problems with it, I manually tested ESLint Playground with this branch and it works fine. |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] 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
[X] Other, please explain:
Replace a dependency
What changes did you make? (Give an overview)
This PR replaces the dependency
@humawhocodes/config-array
with@eslint/config-array
in the current version. The new dependency includes breaking changes: the methodConfigArray.isFileIgnored()
has new semantics (see eslint/rewrite#7). To ensure that everything works like before, this PR replaces usages ofisFileIgnored
withgetConfig
.Is there anything you'd like reviewers to focus on?