fix(eslint-config): add spread to `tseslint.configs.recommended` (#1084)
parent
9a98e388cc
commit
8e6961ec9b
|
@ -6,98 +6,91 @@ import tseslint from 'typescript-eslint'
|
|||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
nodePlugin.configs["flat/recommended"],
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslint.plugin,
|
||||
'import-x': importX,
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
fetch: false,
|
||||
Response: false,
|
||||
Request: false,
|
||||
addEventListener: false,
|
||||
},
|
||||
nodePlugin.configs['flat/recommended'],
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
plugins: {
|
||||
'@typescript-eslint': tseslint.plugin,
|
||||
'import-x': importX,
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
fetch: false,
|
||||
Response: false,
|
||||
Request: false,
|
||||
addEventListener: false,
|
||||
},
|
||||
|
||||
ecmaVersion: 2021,
|
||||
sourceType: 'module',
|
||||
},
|
||||
ecmaVersion: 2021,
|
||||
sourceType: 'module',
|
||||
},
|
||||
|
||||
rules: {
|
||||
curly: ['error', 'all'],
|
||||
quotes: ['error', 'single'],
|
||||
semi: ['error', 'never'],
|
||||
'no-debugger': ['error'],
|
||||
rules: {
|
||||
curly: ['error', 'all'],
|
||||
quotes: ['error', 'single'],
|
||||
semi: ['error', 'never'],
|
||||
'no-debugger': ['error'],
|
||||
|
||||
'no-empty': [
|
||||
'warn',
|
||||
{
|
||||
allowEmptyCatch: true,
|
||||
},
|
||||
],
|
||||
'no-empty': [
|
||||
'warn',
|
||||
{
|
||||
allowEmptyCatch: true,
|
||||
},
|
||||
],
|
||||
|
||||
'no-process-exit': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
'no-process-exit': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
|
||||
'prefer-const': [
|
||||
'warn',
|
||||
{
|
||||
destructuring: 'all',
|
||||
},
|
||||
],
|
||||
'prefer-const': [
|
||||
'warn',
|
||||
{
|
||||
destructuring: 'all',
|
||||
},
|
||||
],
|
||||
|
||||
'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
||||
'import-x/order': [
|
||||
'error',
|
||||
{
|
||||
groups: [
|
||||
'external',
|
||||
'builtin',
|
||||
'internal',
|
||||
'parent',
|
||||
'sibling',
|
||||
'index',
|
||||
],
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
'import-x/no-duplicates': 'error',
|
||||
'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level'],
|
||||
'import-x/order': [
|
||||
'error',
|
||||
{
|
||||
groups: ['external', 'builtin', 'internal', 'parent', 'sibling', 'index'],
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
'import-x/no-duplicates': 'error',
|
||||
|
||||
'n/no-missing-import': 'off',
|
||||
'n/no-missing-require': 'off',
|
||||
'n/no-deprecated-api': 'off',
|
||||
'n/no-unpublished-import': 'off',
|
||||
'n/no-unpublished-require': 'off',
|
||||
'n/no-unsupported-features/es-syntax': 'off',
|
||||
'n/no-unsupported-features/node-builtins': 'off',
|
||||
'n/no-missing-import': 'off',
|
||||
'n/no-missing-require': 'off',
|
||||
'n/no-deprecated-api': 'off',
|
||||
'n/no-unpublished-import': 'off',
|
||||
'n/no-unpublished-require': 'off',
|
||||
'n/no-unsupported-features/es-syntax': 'off',
|
||||
'n/no-unsupported-features/node-builtins': 'off',
|
||||
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
prefer: 'type-imports',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/no-unsafe-function-type': 'off',
|
||||
'@typescript-eslint/no-empty-function': [
|
||||
'error',
|
||||
{
|
||||
allow: ['arrowFunctions'],
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-empty-interface': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-inferrable-types': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'warn',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
},
|
||||
},
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{
|
||||
prefer: 'type-imports',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/no-unsafe-function-type': 'off',
|
||||
'@typescript-eslint/no-empty-function': [
|
||||
'error',
|
||||
{
|
||||
allow: ['arrowFunctions'],
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-empty-interface': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-inferrable-types': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'warn',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
},
|
||||
},
|
||||
prettier,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue