diff options
Diffstat (limited to 'eslint.config.js')
| -rw-r--r-- | eslint.config.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/eslint.config.js b/eslint.config.js index 4902b2f0d..faa97e718 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,6 @@ import globals from 'globals'; import js from '@eslint/js'; +import stylistic from '@stylistic/eslint-plugin'; export default [ js.configs.recommended, @@ -18,6 +19,10 @@ export default [ } }, + plugins: { + '@stylistic/js': stylistic + }, + rules: { 'no-undef': 'warn', 'no-unused-vars': 'warn', @@ -30,18 +35,17 @@ export default [ 'no-caller': 'error', 'no-proto': 'error', - 'linebreak-style': ['error', 'unix'], - 'eol-last': 'error', - 'no-trailing-spaces': 'error', - 'no-multiple-empty-lines': ['error', { 'max': 2 }], - - 'keyword-spacing': ['error', { 'after': true, 'before': true }], - 'block-spacing': ['error', 'always'], - 'computed-property-spacing': ['error', 'never'], - 'no-empty': ['error', { 'allowEmptyCatch': true }], - 'max-statements-per-line': ['warn', { 'max': 2 }] + // Stylistic rules (replacing those deprecated in ESLint) + '@stylistic/js/linebreak-style': ['error', 'unix'], + '@stylistic/js/eol-last': 'error', + '@stylistic/js/no-trailing-spaces': 'error', + '@stylistic/js/no-multiple-empty-lines': ['error', { 'max': 2 }], + '@stylistic/js/keyword-spacing': ['error', { 'after': true, 'before': true }], + '@stylistic/js/block-spacing': ['error', 'always'], + '@stylistic/js/computed-property-spacing': ['error', 'never'], + '@stylistic/js/max-statements-per-line': ['warn', { 'max': 2 }] } } ]; |