From 1fecb5cb920a4b67952a28d85390d7888b7c2b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 2 Apr 2025 11:31:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=96=B0=E7=BB=84?= =?UTF-8?q?=E7=BB=87=20ESLint=20=E6=8F=92=E4=BB=B6=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8C=BA=E5=9F=9F=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BB=A5=E6=8F=90=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.ts | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/eslint.config.ts b/eslint.config.ts index e8778e5..cc8b1ee 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -53,6 +53,7 @@ export default defineConfigWithVueTs( ...oxlint.configs['flat/recommended'], skipFormatting, + // region >> eslint-plugin-unicorn >> eslintPluginUnicorn.configs.recommended, { rules: { @@ -63,7 +64,9 @@ export default defineConfigWithVueTs( 'unicorn/prevent-abbreviations': 'off', }, }, + // endregion <<< eslint-plugin-unicorn <<< + // region >>> eslint-plugin-import-x >>> eslintPluginImportX.flatConfigs.recommended, { rules: { @@ -72,6 +75,19 @@ export default defineConfigWithVueTs( 'import-x/first': 'error', }, }, + // endregion <<< eslint-plugin-import-x <<< + + // region >>> eslint-plugin-perfectionist >>> + // https://perfectionist.dev/guide/getting-started + perfectionist.configs['recommended-natural'], + { + rules: { + 'perfectionist/sort-classes': 'off', + 'perfectionist/sort-objects': 'off', + 'perfectionist/sort-imports': ['error'], + }, + }, + // endregion <<< eslint-plugin-perfectionist <<< { rules: { @@ -91,16 +107,4 @@ export default defineConfigWithVueTs( 'vue/multi-word-component-names': 'off', }, }, - - // https://perfectionist.dev/guide/getting-started - [ - perfectionist.configs['recommended-natural'], - { - rules: { - 'perfectionist/sort-classes': 'off', - 'perfectionist/sort-objects': 'off', - 'perfectionist/sort-imports': ['error'], - }, - }, - ], );