From bb02a1b967dc12f4df42df72768c42fc4a056b13 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Wed, 25 Dec 2024 10:08:12 +0900 Subject: [PATCH] chore(eslint): remove duplicate rules, rearrange sequentially within a rule --- eslint.config.mjs | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b83fc69cdf..b362194845 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -55,26 +55,20 @@ export default tseslint.config( }, }, rules: { - ...reactHooks.configs.recommended.rules, - 'react-compiler/react-compiler': 'warn', eqeqeq: 'error', - 'no-var': 'error', - 'prefer-const': 'error', curly: ['warn', 'multi-line', 'consistent'], 'no-console': 'off', + 'sort-imports': [ + 'error', + { + ignoreDeclarationSort: true, + }, + ], 'import/extensions': ['error', 'always'], 'import/no-unresolved': ['error', { commonjs: true, amd: true }], 'import/export': 'error', 'import/no-duplicates': ['error'], 'import/no-named-as-default-member': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-unused-vars': [ - 'warn', - { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, - ], - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-explicit-any': 'off', 'import/namespace': 'off', 'import/named': 'off', 'import/order': [ @@ -101,12 +95,13 @@ export default tseslint.config( pathGroupsExcludedImportTypes: ['builtin'], }, ], - 'sort-imports': [ - 'error', - { - ignoreDeclarationSort: true, - }, + '@typescript-eslint/no-unused-vars': [ + 'warn', + { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, ], + '@typescript-eslint/no-explicit-any': 'off', + ...reactHooks.configs.recommended.rules, + 'react-compiler/react-compiler': 'warn', }, }, { @@ -115,8 +110,8 @@ export default tseslint.config( ...jestDom.configs['flat/recommended'], ...vitest.configs.recommended, rules: { - 'testing-library/no-node-access': 'off', 'import/extensions': ['error', 'never'], + 'testing-library/no-node-access': 'off', 'vitest/expect-expect': 'off', 'vitest/consistent-test-it': [ 'error',