diff --git a/.changeset/cuddly-walls-shake.md b/.changeset/cuddly-walls-shake.md new file mode 100644 index 00000000..46cf46ae --- /dev/null +++ b/.changeset/cuddly-walls-shake.md @@ -0,0 +1,5 @@ +--- +'@hono/eslint-config': patch +--- + +fix: update rules diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index c79044a5..25870add 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -25,6 +25,7 @@ module.exports = defineConfig({ quotes: ['error', 'single'], semi: ['error', 'never'], 'no-debugger': ['error'], + 'no-duplicate-imports': 'error', 'no-empty': ['warn', { allowEmptyCatch: true }], 'no-process-exit': 'off', 'no-useless-escape': 'off', @@ -34,17 +35,17 @@ module.exports = defineConfig({ destructuring: 'all', }, ], - '@typescript-eslint/ban-types': [ + 'sort-imports': [ 'error', { - types: { - Function: false, - '{}': false, - }, + ignoreCase: false, + ignoreDeclarationSort: true, + ignoreMemberSort: false, + memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], }, ], - 'sort-imports': 0, - 'import/order': [2, { alphabetize: { order: 'asc' } }], + + 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'], 'node/no-missing-import': 'off', 'node/no-missing-require': 'off', @@ -53,6 +54,15 @@ module.exports = defineConfig({ 'node/no-unpublished-require': 'off', 'node/no-unsupported-features/es-syntax': 'off', + '@typescript-eslint/ban-types': [ + 'error', + { + types: { + Function: false, + '{}': false, + }, + }, + ], '@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }], '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-explicit-any': 'warn',