From 4986a53ddd41552c2a37f320ea4e2801229d28e8 Mon Sep 17 00:00:00 2001 From: piquark6046 Date: Sun, 24 Mar 2024 13:10:59 +0000 Subject: [PATCH] lint: update ESLint --- .eslintrc.cjs | 10 ++++++---- package.json | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 1d0abbc..7907c27 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,7 +8,7 @@ module.exports = { tsconfigRootDir: __dirname, project: './tsconfig.json' }, - plugins: ['@typescript-eslint'], + plugins: ['@typescript-eslint', '@stylistic'], rules: { '@typescript-eslint/naming-convention': ['error', { selector: ['variableLike', 'parameterProperty', 'classProperty', 'typeProperty'], @@ -17,9 +17,11 @@ module.exports = { '@typescript-eslint/prefer-nullish-coalescing': 'off', 'new-cap': 'off', 'no-var': 'off', - 'comma-dangle': 'off', - indent: ['off', 'tab'], - semi: ['error', 'never'] + '@stylistic/indent': ['off', 'tab'], + '@stylistic/semi': ['error', 'never'], + '@stylistic/comma-dangle': ['error', 'never'], + '@stylistic/comma-spacing': ['error', { before: false, after: true }], + '@stylistic/quotes': ['error', 'single'], }, ignorePatterns: ['dist', 'node_modules', '.eslintrc.cjs'] } diff --git a/package.json b/package.json index 742c60a..3dc59d5 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "typescript": "^5.4.3" }, "devDependencies": { + "@stylistic/eslint-plugin": "^1.7.0", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "eslint": "^8.57.0",