fix(eslint-config): update rules (#543)

* fix(eslint-config): update rules

* add changeset
pull/544/head
Yusuke Wada 2024-05-26 04:40:13 +09:00 committed by GitHub
parent 54777128b8
commit ee6569d62b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 25 additions and 10 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/eslint-config': patch
---
fix: update rules

View File

@ -25,6 +25,7 @@ module.exports = defineConfig({
quotes: ['error', 'single'], quotes: ['error', 'single'],
semi: ['error', 'never'], semi: ['error', 'never'],
'no-debugger': ['error'], 'no-debugger': ['error'],
'no-duplicate-imports': 'error',
'no-empty': ['warn', { allowEmptyCatch: true }], 'no-empty': ['warn', { allowEmptyCatch: true }],
'no-process-exit': 'off', 'no-process-exit': 'off',
'no-useless-escape': 'off', 'no-useless-escape': 'off',
@ -34,6 +35,25 @@ module.exports = defineConfig({
destructuring: 'all', destructuring: 'all',
}, },
], ],
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'node/no-deprecated-api': 'off',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'@typescript-eslint/ban-types': [ '@typescript-eslint/ban-types': [
'error', 'error',
{ {
@ -43,16 +63,6 @@ module.exports = defineConfig({
}, },
}, },
], ],
'sort-imports': 0,
'import/order': [2, { alphabetize: { order: 'asc' } }],
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'node/no-deprecated-api': 'off',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }], '@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-explicit-any': 'warn',