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
Chore: Simplify dataflow in linter.verify #10020
Conversation
linter.verify(code, { rules: { foobar: null } }); | ||
}, /Invalid config for rule 'foobar'\./); | ||
}); | ||
}); |
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 removed this test because we were doing config validation in two separate places: ConfigValidator
which verifies all parts of a config including rule schemas, and Linter
where we were only checking if a rule's configured value was null
and skipping all other validation. The second validation is generally redundant with the first validation.
76abcea
to
6e6d46d
Compare
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!
Just out of curiosity, what was the effect of the incorrect configuration in conf/environments.js?
I think it meant the |
What is the purpose of this pull request? (put an "X" next to item)
[x] Other, please explain:
What changes did you make? (Give an overview)
This refactors
linter.verify
to simplify the dataflow throughout the function, and separate out some parts when possible. Specifically:parserOptions
andglobals
.linter.verify
are now processed into a consistent object in a separate function.This should make it easier to implement #9998.
Is there anything you'd like reviewers to focus on?
Nothing in particular