dev-manager-tauri/src-tauri/resources/onboarding/lefthook.yml.tmpl
lanrtop be2f69578a docs(conventions): v1.11.0——同步使者回传的四项治理修复
- Session 结束汇总加限定语,不得作为跳过确认卡的通道
- acceptance 格式补 agent_verify/human_verify 分层说明
- 阶段2末尾引用 AGENTS.md 需求对齐协议(Bug Fix/Feature 分类)
- Rust/Tauri 专属章节顶部加 scope 前置提示,避免污染 web 项目
- lefthook.yml.tmpl:API typecheck 注释由警告升级为 REQUIRED 措辞
2026-07-15 12:16:31 +09:00

25 lines
1.1 KiB
Cheetah
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 接入包标准 lefthook 配置(炼境分发)
# 作用:强制 Conventional Commits + 提交前类型检查
# 安装pnpm add -D lefthook && pnpm exec lefthook install
pre-commit:
parallel: true
commands:
# TODO: 按项目调整 typecheck 命令与 globmonorepo 用 --filter <pkg> typecheck
typecheck:
glob: "*.{ts,tsx}"
run: pnpm typecheck
# 🚨 【必填项】项目有 API / 后端层时,必须取消注释并按实际路径配置——
# 否则后端类型错误不会被 pre-commit 拦截(前端 typecheck 只覆盖 src/ 层)。
# 按实际填写一行,其余示例行可删掉:
# api-typecheck:
# glob: "api/**/*.{ts,tsx}"
# run: pnpm --filter api typecheck # monorepo workspace
# # run: pnpm exec tsc -p api/tsconfig.json --noEmit # 独立 tsconfig
# # run: pnpm -r typecheck # 递归所有包
commit-msg:
commands:
conventional:
run: "head -1 .git/COMMIT_EDITMSG | grep -qE '^(feat|fix|docs|chore|refactor|ci|perf|style|test|build|revert)(\\(.+\\))?!?: .+' || exit 1"