Skip to content
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

Fix: validate schema for built-in rules #14

Merged
merged 1 commit into from Oct 27, 2020
Merged

Conversation

mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Oct 26, 2020

This re-enables validating configuration for built-in rules.

eslint/eslint#13793

@@ -484,7 +486,7 @@ class CascadingConfigArrayFactory {

// Validate rule settings and environments.
const validator = new ConfigValidator({
builtInRules: configArrayFactory.builtInRules
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configArrayFactory stores builtInRules in internalSlotsMap, so this was undefined.

Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice catch @mdjermanovic

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for this? Maybe once #13 is merged?

@mdjermanovic
Copy link
Member Author

Sure, but since there's no place to add the test at the moment in this repo, and this is going into today's patch release, I'd suggest we merge this as is today, and add tests in a follow-up.

I tested this locally, and @btmills prepared an integration test that covers this in eslint/eslint#13794

@nzakas
Copy link
Member

nzakas commented Oct 26, 2020

I'm okay with that so long as there's an issue open to track adding the tests.

@mdjermanovic
Copy link
Member Author

Issue to track adding the tests: #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants