-
Hi gulpfile.mjs
package.json :
.eslint.config.js
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It looks like you are using two fixable rules with conflicting settings. Note that the
while your config file sets
This results in a situation where ESLint cannot apply fixes automatically. Since you are relying on recommended import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import stylistic from "@stylistic/eslint-plugin";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
export default [...compat.extends('eslint:recommended', 'plugin:@stylistic/recommended-extends'), {
languageOptions: {
globals: {
...globals.browser,
},
ecmaVersion: 2015,
sourceType: 'module',
},
plugins: {
'@stylistic': stylistic
},
rules: {
'@stylistic/indent': ['error', 2],
"@stylistic/quotes": ['error', 'single', { avoidEscape: true } ],
'@stylistic/semi': ['error', 'always'],
'no-undef': 'off',
},
}]; |
Beta Was this translation helpful? Give feedback.
It looks like you are using two fixable rules with conflicting settings. Note that the
@stylistic/recommended-extends
config will setwhile your config file sets
This results in a situation where ESLint cannot apply fixes automatically. Since you are relying on recommended
@stylistic
rules, I would use only those rules and not the corresponding ones from@stylistic/js
. You could update your config file like this: