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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/cascading-config-array-factory.js
Expand Up @@ -255,7 +255,8 @@ class CascadingConfigArrayFactory {
ignorePath,
rulePaths,
specificConfigPath,
useEslintrc
useEslintrc,
builtInRules
});
}

Expand Down Expand Up @@ -438,7 +439,8 @@ class CascadingConfigArrayFactory {
cliConfigArray,
configArrayFactory,
finalizeCache,
useEslintrc
useEslintrc,
builtInRules
} = internalSlotsMap.get(this);

let finalConfigArray = finalizeCache.get(configArray);
Expand Down Expand Up @@ -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.

builtInRules
});

validator.validateConfigArray(finalConfigArray);
Expand Down