refactor: remove tsc check from lint-staged and reorder lint commands

This commit is contained in:
雨霖铃
2026-05-22 23:12:32 +08:00
parent a3b2bfb43a
commit 67c0c30a7a
+1 -14
View File
@@ -1,17 +1,4 @@
export default {
// 对于代码文件:
'*.{ts,tsx,js,jsx,mjs}': [
// 1. Prettier: 全局格式化
'prettier --write',
// 2. ESLint: 检查并自动修复
// --no-warn-ignored: 抑制对忽略文件的警告(eslint.config.ts 中忽略了测试文件)
'eslint --fix --max-warnings=0 --no-warn-ignored',
// 3. TypeScript: 类型检查
() => 'tsc --noEmit',
],
// 对于其他文件:
'*.{ts,tsx,js,jsx,mjs}': ['eslint --fix --max-warnings=0 --no-warn-ignored', 'prettier --write'],
'*.{json,css,scss,md}': ['prettier --write'],
};