feat:组件框架
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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: '^_' }],
|
||||
},
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user