Pre-commit hooks (lint-staged + Husky)
Problem¶
No pre-commit hooks existed. Lint errors and formatting issues could be committed and only caught in CI, slowing the feedback loop and creating noisy PRs with follow-up "fix lint" commits.
Proposal¶
- Install
husky+lint-stagedat root - Pre-commit:
biome check --writeon staged.ts/.tsx/.js/.jsx/.css/.jsonfiles - Pre-commit:
prettier --writeon staged.md/.mdx/.mdcfiles
Acceptance criteria¶
-
huskyinitialized with.husky/pre-commit -
lint-stagedconfig in rootpackage.json -
"prepare": "husky"script present (auto-installs hooks onnpm install) - Biome formats TS/JS/CSS/JSON; Prettier formats markdown
-
--no-errors-on-unmatchedprevents failures on deletions
Out of scope¶
- Pre-push typecheck hook (can be added later if CI latency is a problem)
- Commitlint / conventional commits enforcement
Notes / decisions log¶
- 2026-07-07: Proposed. Planned to include
--no-errors-on-unmatchedfor biome so staged deletions do not fail the hook. - 2026-07-09: Deferred — moved to tickets/deferred/; no active implementation planned.