Skip to content

Commit

Permalink
Fix: cache compiled config schema (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Oct 23, 2020
1 parent b347ca0 commit 04f3cae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shared/config-validator.js
Expand Up @@ -265,7 +265,7 @@ module.exports = class ConfigValidator {
* @returns {void}
*/
validateConfigSchema(config, source = null) {
validateSchema = this.validateSchema || ajv.compile(configSchema);
validateSchema = validateSchema || ajv.compile(configSchema);

if (!validateSchema(config)) {
throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`);
Expand Down

0 comments on commit 04f3cae

Please sign in to comment.