Pre-commit formats staged files and both hooks run affected lint and typecheck. Unit tests run only in CI.
ADR 0022 put pnpm verify:affected on both pre-commit and pre-push: the Ultracite fix on staged files, then affected lint, typecheck and test:unit. Commits took from several seconds to a few minutes. Most of that time went to unit tests in workspaces the change only touched through a dependency, to the pnpm dependency check on every script call, and to Turbo cache misses that never matched CI's hashes. CI already runs every unit test on each push to develop, so a test failure is caught within minutes either way.
oxfmt on the staged files and stages the result, then runs turbo run lint typecheck --affected against origin/develop. Pre-push runs the same lint and typecheck gate. Neither hook runs test:unit.node_modules/.bin binaries directly instead of going through pnpm, read the remote cache without writing to it, and skip during merges and rebases.pnpm verify:affected matches the hook gate, so running it by hand predicts what the hooks will block.pnpm fix or pnpm lint:fix when the gate reports a fixable rule.develop. Run the narrowest vitest run for the workspace you changed before committing.Last updated on