mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 添加定期更新检查功能并优化相关逻辑;调整 ESLint 配置以放宽类型检查规则
This commit is contained in:
@@ -61,14 +61,31 @@ export default antfu(
|
||||
// TypeScript 相关规则
|
||||
'ts/no-explicit-any': 'off',
|
||||
'ts/ban-ts-comment': 'off',
|
||||
'ts/no-floating-promises': 'off', // 允许不 await Promise
|
||||
'ts/no-misused-promises': 'off', // 允许在条件表达式中使用 Promise
|
||||
'@typescript-eslint/no-floating-promises': 'off',
|
||||
'@typescript-eslint/no-misused-promises': 'off',
|
||||
|
||||
// 通用规则
|
||||
'no-console': 'off',
|
||||
'unused-imports/no-unused-vars': 'warn',
|
||||
'eqeqeq': 'off', // 允许使用 == 和 !=
|
||||
'no-eq-null': 'off', // 允许使用 == null
|
||||
'@typescript-eslint/strict-boolean-expressions': 'off', // 允许宽松的布尔表达式
|
||||
|
||||
// 关闭一些过于严格的规则
|
||||
'antfu/if-newline': 'off',
|
||||
'style/brace-style': ['error', '1tbs'],
|
||||
'prefer-promise-reject-errors': 'off', // 允许 reject 任何值
|
||||
'no-throw-literal': 'off', // 允许 throw 任何值
|
||||
'ts/no-unsafe-assignment': 'off', // 允许不安全的赋值
|
||||
'ts/no-unsafe-member-access': 'off', // 允许不安全的成员访问
|
||||
'ts/no-unsafe-call': 'off', // 允许不安全的调用
|
||||
'ts/switch-exhaustiveness-check': 'warn', // 允许 switch 不覆盖所有情况
|
||||
'ts/restrict-template-expressions': 'off', // 允许模板字符串表达式不受限制
|
||||
|
||||
// JSON 相关规则
|
||||
'jsonc/sort-keys': 'off', // 关闭 JSON key 排序要求
|
||||
},
|
||||
},
|
||||
// 集成 VueVine 配置
|
||||
|
||||
Reference in New Issue
Block a user