ncu -u; migrate @stylistic/eslint-plugin{-js,}

https://eslint.style/guide/migration
This commit is contained in:
Ralf Vogler 2025-05-24 22:47:08 +02:00
parent 02005b6fee
commit a242b2d5c4
3 changed files with 673 additions and 1550 deletions

View file

@ -2,7 +2,7 @@
// https://eslint.org/docs/latest/use/configure/migration-guide
import js from '@eslint/js';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin-js';
import stylistic from '@stylistic/eslint-plugin';
export default [
// https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
@ -21,59 +21,59 @@ export default [
},
},
plugins: {
'@stylistic/js': stylistic,
'@stylistic': stylistic,
},
// https://eslint.org/docs/latest/rules/
// https://eslint.style/packages/js
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'prefer-const': 'error',
'@stylistic/js/array-bracket-newline': ['error', 'consistent'],
'@stylistic/js/array-bracket-spacing': 'error',
'@stylistic/js/array-element-newline': ['error', 'consistent'],
'@stylistic/js/arrow-parens': ['error', 'as-needed'],
'@stylistic/js/arrow-spacing': 'error',
'@stylistic/js/block-spacing': 'error',
'@stylistic/js/brace-style': 'error',
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
'@stylistic/js/comma-spacing': 'error',
'@stylistic/js/comma-style': 'error',
'@stylistic/js/eol-last': 'error',
'@stylistic/js/func-call-spacing': 'error',
'@stylistic/js/function-paren-newline': ['error', 'consistent'],
'@stylistic/js/implicit-arrow-linebreak': 'error',
'@stylistic/js/indent': ['error', 2],
'@stylistic/js/key-spacing': 'error',
'@stylistic/js/keyword-spacing': 'error',
'@stylistic/js/linebreak-style': 'error',
'@stylistic/js/no-extra-parens': 'error',
'@stylistic/js/no-extra-semi': 'error',
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
'@stylistic/js/no-multi-spaces': 'error',
'@stylistic/js/no-multiple-empty-lines': 'error',
'@stylistic/js/no-tabs': 'error',
'@stylistic/js/no-trailing-spaces': 'error',
'@stylistic/js/no-whitespace-before-property': 'error',
'@stylistic/js/nonblock-statement-body-position': 'error',
'@stylistic/js/object-curly-newline': 'error',
'@stylistic/js/object-curly-spacing': ['error', 'always'],
'@stylistic/js/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'@stylistic/js/quote-props': ['error', 'as-needed'],
'@stylistic/js/quotes': ['error', 'single'],
'@stylistic/js/rest-spread-spacing': 'error',
'@stylistic/js/semi': 'error',
'@stylistic/js/semi-spacing': 'error',
'@stylistic/js/semi-style': 'error',
'@stylistic/js/space-before-blocks': 'error',
'@stylistic/js/space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
'@stylistic/js/space-in-parens': 'error',
'@stylistic/js/space-infix-ops': 'error',
'@stylistic/js/space-unary-ops': 'error',
'@stylistic/js/spaced-comment': 'error',
'@stylistic/js/switch-colon-spacing': 'error',
'@stylistic/js/template-curly-spacing': 'error',
'@stylistic/js/template-tag-spacing': 'error',
'@stylistic/js/wrap-regex': 'error',
'@stylistic/array-bracket-newline': ['error', 'consistent'],
'@stylistic/array-bracket-spacing': 'error',
'@stylistic/array-element-newline': ['error', 'consistent'],
'@stylistic/arrow-parens': ['error', 'as-needed'],
'@stylistic/arrow-spacing': 'error',
'@stylistic/block-spacing': 'error',
'@stylistic/brace-style': 'error',
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/comma-spacing': 'error',
'@stylistic/comma-style': 'error',
'@stylistic/eol-last': 'error',
'@stylistic/func-call-spacing': 'error',
'@stylistic/function-paren-newline': ['error', 'consistent'],
'@stylistic/implicit-arrow-linebreak': 'error',
'@stylistic/indent': ['error', 2],
'@stylistic/key-spacing': 'error',
'@stylistic/keyword-spacing': 'error',
'@stylistic/linebreak-style': 'error',
'@stylistic/no-extra-parens': 'error',
'@stylistic/no-extra-semi': 'error',
'@stylistic/no-mixed-spaces-and-tabs': 'error',
'@stylistic/no-multi-spaces': 'error',
'@stylistic/no-multiple-empty-lines': 'error',
'@stylistic/no-tabs': 'error',
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/no-whitespace-before-property': 'error',
'@stylistic/nonblock-statement-body-position': 'error',
'@stylistic/object-curly-newline': 'error',
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'@stylistic/quote-props': ['error', 'as-needed'],
'@stylistic/quotes': ['error', 'single'],
'@stylistic/rest-spread-spacing': 'error',
'@stylistic/semi': 'error',
'@stylistic/semi-spacing': 'error',
'@stylistic/semi-style': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
'@stylistic/space-in-parens': 'error',
'@stylistic/space-infix-ops': 'error',
'@stylistic/space-unary-ops': 'error',
'@stylistic/spaced-comment': 'error',
'@stylistic/switch-colon-spacing': 'error',
'@stylistic/template-curly-spacing': 'error',
'@stylistic/template-tag-spacing': 'error',
'@stylistic/wrap-regex': 'error',
},
},
];

2123
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@
"puppeteer-extra-plugin-stealth": "^2.11.2"
},
"devDependencies": {
"@stylistic/eslint-plugin-js": "^4.2.0",
"eslint": "^9.26.0"
"@stylistic/eslint-plugin": "^4.4.0",
"eslint": "^9.27.0"
}
}