ncu -u; migrate @stylistic/eslint-plugin{-js,}
https://eslint.style/guide/migration
This commit is contained in:
parent
02005b6fee
commit
a242b2d5c4
3 changed files with 673 additions and 1550 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
// https://eslint.org/docs/latest/use/configure/migration-guide
|
// https://eslint.org/docs/latest/use/configure/migration-guide
|
||||||
import js from '@eslint/js';
|
import js from '@eslint/js';
|
||||||
import globals from 'globals';
|
import globals from 'globals';
|
||||||
import stylistic from '@stylistic/eslint-plugin-js';
|
import stylistic from '@stylistic/eslint-plugin';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
// https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
// https://eslint.org/docs/latest/use/configure/configuration-files-new#globally-ignoring-files-with-ignores
|
||||||
|
|
@ -21,59 +21,59 @@ export default [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
'@stylistic/js': stylistic,
|
'@stylistic': stylistic,
|
||||||
},
|
},
|
||||||
// https://eslint.org/docs/latest/rules/
|
// https://eslint.org/docs/latest/rules/
|
||||||
// https://eslint.style/packages/js
|
// https://eslint.style/packages/js
|
||||||
rules: {
|
rules: {
|
||||||
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||||
'prefer-const': 'error',
|
'prefer-const': 'error',
|
||||||
'@stylistic/js/array-bracket-newline': ['error', 'consistent'],
|
'@stylistic/array-bracket-newline': ['error', 'consistent'],
|
||||||
'@stylistic/js/array-bracket-spacing': 'error',
|
'@stylistic/array-bracket-spacing': 'error',
|
||||||
'@stylistic/js/array-element-newline': ['error', 'consistent'],
|
'@stylistic/array-element-newline': ['error', 'consistent'],
|
||||||
'@stylistic/js/arrow-parens': ['error', 'as-needed'],
|
'@stylistic/arrow-parens': ['error', 'as-needed'],
|
||||||
'@stylistic/js/arrow-spacing': 'error',
|
'@stylistic/arrow-spacing': 'error',
|
||||||
'@stylistic/js/block-spacing': 'error',
|
'@stylistic/block-spacing': 'error',
|
||||||
'@stylistic/js/brace-style': 'error',
|
'@stylistic/brace-style': 'error',
|
||||||
'@stylistic/js/comma-dangle': ['error', 'always-multiline'],
|
'@stylistic/comma-dangle': ['error', 'always-multiline'],
|
||||||
'@stylistic/js/comma-spacing': 'error',
|
'@stylistic/comma-spacing': 'error',
|
||||||
'@stylistic/js/comma-style': 'error',
|
'@stylistic/comma-style': 'error',
|
||||||
'@stylistic/js/eol-last': 'error',
|
'@stylistic/eol-last': 'error',
|
||||||
'@stylistic/js/func-call-spacing': 'error',
|
'@stylistic/func-call-spacing': 'error',
|
||||||
'@stylistic/js/function-paren-newline': ['error', 'consistent'],
|
'@stylistic/function-paren-newline': ['error', 'consistent'],
|
||||||
'@stylistic/js/implicit-arrow-linebreak': 'error',
|
'@stylistic/implicit-arrow-linebreak': 'error',
|
||||||
'@stylistic/js/indent': ['error', 2],
|
'@stylistic/indent': ['error', 2],
|
||||||
'@stylistic/js/key-spacing': 'error',
|
'@stylistic/key-spacing': 'error',
|
||||||
'@stylistic/js/keyword-spacing': 'error',
|
'@stylistic/keyword-spacing': 'error',
|
||||||
'@stylistic/js/linebreak-style': 'error',
|
'@stylistic/linebreak-style': 'error',
|
||||||
'@stylistic/js/no-extra-parens': 'error',
|
'@stylistic/no-extra-parens': 'error',
|
||||||
'@stylistic/js/no-extra-semi': 'error',
|
'@stylistic/no-extra-semi': 'error',
|
||||||
'@stylistic/js/no-mixed-spaces-and-tabs': 'error',
|
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||||
'@stylistic/js/no-multi-spaces': 'error',
|
'@stylistic/no-multi-spaces': 'error',
|
||||||
'@stylistic/js/no-multiple-empty-lines': 'error',
|
'@stylistic/no-multiple-empty-lines': 'error',
|
||||||
'@stylistic/js/no-tabs': 'error',
|
'@stylistic/no-tabs': 'error',
|
||||||
'@stylistic/js/no-trailing-spaces': 'error',
|
'@stylistic/no-trailing-spaces': 'error',
|
||||||
'@stylistic/js/no-whitespace-before-property': 'error',
|
'@stylistic/no-whitespace-before-property': 'error',
|
||||||
'@stylistic/js/nonblock-statement-body-position': 'error',
|
'@stylistic/nonblock-statement-body-position': 'error',
|
||||||
'@stylistic/js/object-curly-newline': 'error',
|
'@stylistic/object-curly-newline': 'error',
|
||||||
'@stylistic/js/object-curly-spacing': ['error', 'always'],
|
'@stylistic/object-curly-spacing': ['error', 'always'],
|
||||||
'@stylistic/js/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
|
'@stylistic/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
|
||||||
'@stylistic/js/quote-props': ['error', 'as-needed'],
|
'@stylistic/quote-props': ['error', 'as-needed'],
|
||||||
'@stylistic/js/quotes': ['error', 'single'],
|
'@stylistic/quotes': ['error', 'single'],
|
||||||
'@stylistic/js/rest-spread-spacing': 'error',
|
'@stylistic/rest-spread-spacing': 'error',
|
||||||
'@stylistic/js/semi': 'error',
|
'@stylistic/semi': 'error',
|
||||||
'@stylistic/js/semi-spacing': 'error',
|
'@stylistic/semi-spacing': 'error',
|
||||||
'@stylistic/js/semi-style': 'error',
|
'@stylistic/semi-style': 'error',
|
||||||
'@stylistic/js/space-before-blocks': 'error',
|
'@stylistic/space-before-blocks': 'error',
|
||||||
'@stylistic/js/space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
|
'@stylistic/space-before-function-paren': ['error', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
|
||||||
'@stylistic/js/space-in-parens': 'error',
|
'@stylistic/space-in-parens': 'error',
|
||||||
'@stylistic/js/space-infix-ops': 'error',
|
'@stylistic/space-infix-ops': 'error',
|
||||||
'@stylistic/js/space-unary-ops': 'error',
|
'@stylistic/space-unary-ops': 'error',
|
||||||
'@stylistic/js/spaced-comment': 'error',
|
'@stylistic/spaced-comment': 'error',
|
||||||
'@stylistic/js/switch-colon-spacing': 'error',
|
'@stylistic/switch-colon-spacing': 'error',
|
||||||
'@stylistic/js/template-curly-spacing': 'error',
|
'@stylistic/template-curly-spacing': 'error',
|
||||||
'@stylistic/js/template-tag-spacing': 'error',
|
'@stylistic/template-tag-spacing': 'error',
|
||||||
'@stylistic/js/wrap-regex': 'error',
|
'@stylistic/wrap-regex': 'error',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
2117
package-lock.json
generated
2117
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -31,7 +31,7 @@
|
||||||
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@stylistic/eslint-plugin-js": "^4.2.0",
|
"@stylistic/eslint-plugin": "^4.4.0",
|
||||||
"eslint": "^9.26.0"
|
"eslint": "^9.27.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue