chore: 提交和推送前增加前端 TypeScript 检查

与 Docker 构建的 tsc -b 对齐,避免类型错误在服务器构建才暴露。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-09-10 11:45:35 +08:00
co-authored by Cursor
parent c1f4e7c7ae
commit 874a95dd6f
7 changed files with 92 additions and 6 deletions
+5 -1
View File
@@ -3,4 +3,8 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
git -C "$ROOT_DIR" config core.hooksPath .githooks
echo "已启用 .githooks(Ruff 格式检查 + pytest pre-push 门禁;TYPECHECK=1 可启用 Pyright)"
echo "已启用 .githooks:"
echo " pre-commit: 暂存的 Python 格式 + 前端 TypeScript"
echo " pre-push: 上述检查 + pytest"
echo " TYPECHECK=1 git push 可额外跑 Pyright"
echo "紧急绕过:git push --no-verify 或 SKIP_TESTS=1 git push"