-
-
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
Update: config-validator should validate overrides #10357
Conversation
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 think this should probably be labeled as a breaking change (and this needs to be discussed in a TSC meeting anyway), but otherwise this LGTM. Thanks!
TSC Summary: The {
"overrides": [{
"files": "*",
"rules": {
"no-undef": ["error", { "InvalidOption": true }]
}
}]
} This PR fixes the bug. This PR is marked as a breaking change since ESLint can throw new config errors on invalid configs. TSC Question: Should we accept this PR? |
I think this is a useful change, but I'm hoping we don't have to delay the 5.0 release for it because we've already received two requests to backport changes. |
I agree. |
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.
Code LGTM, pending formal acceptance by the TSC.
Please feel free to dismiss my review if needed once TSC agrees to accept this. I only left the "request changes" so that an accidental merge would be harder to do. |
It's purely semantics at this point, but IMO it's an enhancement. Config validator came before overrides, so we never agreed to validate overrides (which I think we should) |
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
Looks like we have "quorum" on this PR. With Ilya on vacation and Nicholas working on his health, it's really just @gyandeeps we're missing here. @gyandeeps Any objections to this change? |
What is the purpose of this pull request? (put an "X" next to item)
[X] Bug fix
What changes did you make? (Give an overview)
This PR fixes a bug that ESLint overlooks invalid
env
andrules
option values in theoverrides
option. This is important to catch invalid rule options.This might be a breaking change since it can throw new error on invalid configs.
Is there anything you'd like reviewers to focus on?
Nothing in particular.