From 94924f37b61157d962eb4653ee2635a25e8546ed Mon Sep 17 00:00:00 2001 From: supahgreg Date: Mon, 13 Oct 2025 03:13:36 +0000 Subject: Replace deprecated ESLint styling rules. --- eslint.config.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'eslint.config.js') 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 }] } } ]; -- cgit v1.2.3-54-g00ecf