Git Hooks Pre-push & Commitlint
Native Git hooks ensure code quality and commit message formatting locally.
commit-msg:pnpm exec commitlint --edit $1pre-push: runspnpm pre-push, which invokes the pre-push validation script from@repo/scriptsprepare: runsbun packages/scripts/bin/setup-git-hooks.ts, which configurescore.hooksPathto.githooks
Pre-push validation
Section titled “Pre-push validation”- Change detection for workspaces based on recent diffs
- Runs:
turbo run typecheck|lint|buildfiltered to changed workspaces - Runs Prettier check across the repo
- Blocks the push on failures, prints actionable output
Commitlint
Section titled “Commitlint”- Enforces Conventional Commits; supports scopes for apps/packages and multi-line messages
- Examples:
feat(server): add rate limiterfix(ui): correct button focus statechore: update dependencies