refactor: remove tsc check from lint-staged and reorder lint commands
This commit is contained in:
+1
-14
@@ -1,17 +1,4 @@
|
|||||||
export default {
|
export default {
|
||||||
// 对于代码文件:
|
'*.{ts,tsx,js,jsx,mjs}': ['eslint --fix --max-warnings=0 --no-warn-ignored', 'prettier --write'],
|
||||||
'*.{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',
|
|
||||||
],
|
|
||||||
|
|
||||||
// 对于其他文件:
|
|
||||||
'*.{json,css,scss,md}': ['prettier --write'],
|
'*.{json,css,scss,md}': ['prettier --write'],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user