forked from zhongyidian/super_video
feat: 完善实战进度与技能树联动
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
3e258b87d9
commit
dd233e102b
194 files changed
+2915
-1481
No files matched your search
+27
-17
@@ -5,7 +5,10 @@ import { defineConfig } from 'eslint/config'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
// 直接使用 tsconfig 的绝对路径,避免中文路径在 URL/路径互转时被编码导致读取失败
|
||||
const tsconfigEslintPath = fileURLToPath(new URL('./tsconfig.eslint.json', import.meta.url))
|
||||
const tsconfigRootDir = fileURLToPath(new URL('.', import.meta.url))
|
||||
const tsconfigEslintPath = fileURLToPath(
|
||||
new URL('./tsconfig.eslint.json', import.meta.url),
|
||||
)
|
||||
|
||||
export default defineConfig([
|
||||
// 全局忽略:自身配置文件、产物、第三方静态资源等不参与 lint
|
||||
@@ -18,24 +21,25 @@ export default defineConfig([
|
||||
'public/**',
|
||||
'vite.config.*',
|
||||
'postcss.config.*',
|
||||
'tailwind.config.*'
|
||||
]
|
||||
'tailwind.config.*',
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,tsx,vue}'],
|
||||
languageOptions: { globals: globals.browser }
|
||||
languageOptions: { globals: globals.browser },
|
||||
},
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
// 让 typescript-eslint 使用专用 tsconfig(显式 include .vue)
|
||||
project: [tsconfigEslintPath]
|
||||
}
|
||||
project: [tsconfigEslintPath],
|
||||
tsconfigRootDir,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'off'
|
||||
}
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
},
|
||||
pluginVue.configs['flat/essential'],
|
||||
{
|
||||
@@ -44,22 +48,28 @@ export default defineConfig([
|
||||
parserOptions: {
|
||||
parser: {
|
||||
ts: tseslint.parser,
|
||||
tsx: tseslint.parser
|
||||
tsx: tseslint.parser,
|
||||
},
|
||||
project: [tsconfigEslintPath],
|
||||
tsconfigRootDir,
|
||||
extraFileExtensions: ['.vue'],
|
||||
ecmaFeatures: {
|
||||
jsx: true
|
||||
}
|
||||
}
|
||||
jsx: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
'vue/no-undef-components': [
|
||||
'error',
|
||||
{
|
||||
ignorePatterns: ['router-view', 'router-link', 'RouterView', 'RouterLink']
|
||||
}
|
||||
ignorePatterns: [
|
||||
'router-view',
|
||||
'router-link',
|
||||
'RouterView',
|
||||
'RouterLink',
|
||||
],
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-unused-vars': 'warn',
|
||||
'@typescript-eslint/no-explicit-any': 'off', // 完全禁用 any 检查
|
||||
@@ -71,7 +81,7 @@ export default defineConfig([
|
||||
'@typescript-eslint/no-unsafe-argument': 'off',
|
||||
'@typescript-eslint/no-empty-object-type': 'off', // 允许空接口
|
||||
'@typescript-eslint/no-unused-expressions': 'warn', // 改为警告而非错误
|
||||
'no-unused-expressions': 'off'
|
||||
}
|
||||
}
|
||||
'no-unused-expressions': 'off',
|
||||
},
|
||||
},
|
||||
])
|
||||
Reference in new issue
Block a user