Standardised git hooks for Howells projects. Immutable pre-commit and pre-push configuration.
pnpm add -D @howells/huskyIn package.json:
{
"scripts": {
"prepare": "howells-husky"
},
"lint-staged": {
"*.{js,ts,jsx,tsx,json,jsonc,css}": "howells-format"
}
}That's it. On pnpm install, the hooks are installed automatically.
Runs pnpm lint-staged — formats staged files with howells-format.
Runs pnpm typecheck and pnpm lint. Both must pass before code reaches the remote.
Your package.json must have:
"typecheck"script (e.g.tsc --noEmitorturbo run typecheck)"lint"script (e.g.howells-lintorturbo run lint)"lint-staged"config usinghowells-format
The hooks are shipped from the package, not stored in the project. This means:
- Agents can't weaken hooks to get code to pass
- All projects share identical gate configuration
- Upgrading the package upgrades the hooks everywhere
Hooks are skipped when CI=true or VERCEL=1 (no git hooks needed in CI/deployment).