8 lines
397 B
JavaScript
8 lines
397 B
JavaScript
// lint-staged:pre-commit 时对暂存文件运行检查。
|
||
// - tsc --noEmit:全量类型检查(函数语法返回命令,不追加文件名)。
|
||
// - eslint --fix:仅对暂存的改动文件增量检查(新代码强制 error=0,
|
||
// warning 不阻断提交)。存量历史问题不会因此被卡住。
|
||
export default {
|
||
"*.{ts,tsx}": [() => "tsc --noEmit", "eslint --fix"],
|
||
};
|