37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
|
|
import globals from 'globals'
|
||
|
|
import pluginJs from '@eslint/js'
|
||
|
|
import pluginTypescript from '@typescript-eslint/eslint-plugin'
|
||
|
|
import parserTypescript from '@typescript-eslint/parser'
|
||
|
|
import prettierConfig from 'eslint-config-prettier'
|
||
|
|
|
||
|
|
export default [
|
||
|
|
{
|
||
|
|
files: ['**/*.{ts,tsx}'],
|
||
|
|
languageOptions: {
|
||
|
|
parser: parserTypescript,
|
||
|
|
parserOptions: {
|
||
|
|
ecmaFeatures: {
|
||
|
|
jsx: true,
|
||
|
|
},
|
||
|
|
ecmaVersion: 'latest',
|
||
|
|
sourceType: 'module',
|
||
|
|
},
|
||
|
|
globals: {
|
||
|
|
...globals.browser,
|
||
|
|
...globals.node,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
plugins: {
|
||
|
|
'@typescript-eslint': pluginTypescript,
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
...pluginJs.configs.recommended.rules,
|
||
|
|
...pluginTypescript.configs.recommended.rules,
|
||
|
|
...prettierConfig.rules,
|
||
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
||
|
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
]
|