Skip to content

Commit

Permalink
fix: 🚑 Fix invalid ESLint configuration error (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
idahogurl authored Apr 27, 2022
1 parent ba7cb88 commit c425280
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,23 @@ function createEslintFix(eslintConfig, eslintPath) {
parser: eslintConfig.parser,
globals: eslintConfig.globals,
parserOptions: eslintConfig.parserOptions,
ignorePatterns: eslintConfig.ignorePattern,
ignorePatterns: eslintConfig.ignorePatterns || eslintConfig.ignorePattern,
plugins: eslintConfig.plugins,
env: eslintConfig.env,
settings: eslintConfig.settings,
noInlineConfig: eslintConfig.noInlineConfig,
...eslintConfig.overrideConfig
};

delete eslintConfig.rules;
delete eslintConfig.parser;
delete eslintConfig.parserOptions;
delete eslintConfig.globals;
delete eslintConfig.ignorePatterns;
delete eslintConfig.ignorePattern;
delete eslintConfig.plugins;
delete eslintConfig.env;
delete eslintConfig.noInlineConfig;
delete eslintConfig.settings;

const eslint = getESLint(eslintPath, eslintConfig);
try {
Expand Down

0 comments on commit c425280

Please sign in to comment.