3308fd6071
Wire Husky 9 + lint-staged + commitlint with @commitlint/config-
conventional - the local pair of git hooks defined in ADR-0007.
- package.json declares the prepare script ('husky') so the hooks
install on every fresh pnpm install (no manual step).
- .husky/pre-commit runs 'pnpm exec lint-staged' which formats staged
files via prettier (lint and tests stay in CI per ADR-0015 to keep
commits fast).
- .husky/commit-msg runs 'pnpm exec commitlint --edit "$1"' to enforce
Conventional Commits at commit time. Same check is repeated in CI
for defense in depth.
- commitlint.config.cjs at the workspace root extends @commitlint
/config-conventional.
- lint-staged config in package.json restricts to ts/tsx/js/jsx/html/
scss/css/md/json/yml/yaml under prettier --write.
Verified: a 'feat: ...' commit message is accepted; a message without
a Conventional Commits type is rejected.
2 lines
22 B
Plaintext
2 lines
22 B
Plaintext
pnpm exec lint-staged
|