dev-manager-tauri/src-tauri/resources/onboarding/lefthook.yml.tmpl

17 lines
557 B
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
commit-msg:
commands:
conventional:
run: "head -1 \"{1}\" | grep -qE '^(feat|fix|docs|chore|refactor|ci|perf|style|test|build|revert)(\\(.+\\))?!?: .+' || exit 1"