chore: 提交和推送前增加前端 TypeScript 检查
与 Docker 构建的 tsc -b 对齐,避免类型错误在服务器构建才暴露。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user