chore: 接入 husky + lint-staged,pre-commit 跑 tsc,pre-push 跑 css:audit
- pre-commit: npx lint-staged → tsc --noEmit(仅检查暂存的 TS/TSX 文件)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// lint-staged 配置 —— 配合 husky pre-commit 使用
|
||||
//
|
||||
// 当前只运行 tsc 全量类型检查(tsc 不接受单文件增量检查),
|
||||
// 未来可扩展 ESLint / Prettier / stylelint 等按文件的检查。
|
||||
//
|
||||
// 函数语法返回原始命令字符串,lint-staged 不会追加文件名。
|
||||
|
||||
export default {
|
||||
"*.{ts,tsx}": () => "tsc --noEmit",
|
||||
};
|
||||
Reference in New Issue
Block a user