chore: 接入 ESLint 并修复存量错误
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import js from '@eslint/js'
|
||||
import pluginVue from 'eslint-plugin-vue'
|
||||
import tseslint from 'typescript-eslint'
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: [
|
||||
'dist/**',
|
||||
'node_modules/**',
|
||||
'test-results/**',
|
||||
'playwright-report/**',
|
||||
'env.d.ts',
|
||||
],
|
||||
},
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...pluginVue.configs['flat/essential'],
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
languageOptions: {
|
||||
parserOptions: { parser: tseslint.parser },
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
// 页面级组件与路由表同名(Study/Review/Login…),命名约定见 AGENTS.md
|
||||
'vue/multi-word-component-names': 'off',
|
||||
// 渐进收敛:存量代码仍有 any,新代码约束见 AGENTS.md
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
},
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user