// hooks
Hooks
5Browse 5 Git hooks for automated code quality
Setting Up lint-staged with Pre-commit Hooks
Configure lint-staged to run ESLint and Prettier on staged files before every commit using Husky git hooks.
Pre-push Validation Hook
Husky pre-push hook that runs typecheck + lint + tests scoped to changed files before the push hits the remote — fast enough to keep, strict enough to catch the obvious regressions.
Post-merge Dependency Sync
Husky post-merge hook that re-runs pnpm install whenever pnpm-lock.yaml changed in the merge — closes the 'why is my import broken? oh, missing dep' foot-gun after every pull.
Commit-msg AI Assist Hook
Husky commit-msg hook that detects non-conventional messages, pipes the staged diff plus the developer's intent into a local AI CLI, and offers a conventional-format rewrite the developer can accept, edit, or reject.
Branch Name Enforcement Hook
Husky pre-push hook that rejects branch names not matching a prefix convention (feat/, fix/, chore/, gsd/) — runs on push so local scratch branches stay free-form.