# 接入包标准 lefthook 配置(炼境分发) # 作用:强制 Conventional Commits + 提交前类型检查 # 安装:pnpm add -D lefthook && pnpm exec lefthook install pre-commit: parallel: true commands: # TODO: 按项目调整 typecheck 命令与 glob(monorepo 用 --filter 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"