0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-28 17:22:54 +01:00
hono/.eslintrc.js

61 lines
1.6 KiB
JavaScript
Raw Normal View History

const { defineConfig } = require('eslint-define-config')
module.exports = defineConfig({
root: true,
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:@typescript-eslint/recommended',
2022-02-17 13:24:08 +01:00
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2021,
},
plugins: ['@typescript-eslint', 'import'],
globals: {
fetch: false,
Response: false,
Request: false,
addEventListener: false,
},
rules: {
quotes: ['error', 'single'],
semi: ['error', 'never'],
'no-debugger': ['error'],
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-process-exit': 'off',
'no-useless-escape': 'off',
'prefer-const': [
'warn',
{
destructuring: 'all',
},
],
2022-02-17 13:24:08 +01:00
'@typescript-eslint/ban-types': [
'error',
{
types: {
Function: false,
},
},
],
'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',
2022-02-17 13:24:08 +01:00
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-var-requires': 'off',
2022-02-17 13:24:08 +01:00
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
},
})