git hooks
# Install Huskypnpm add -D husky lint-stagedpnpm exec husky init
# Create pre-commit hookecho 'pnpm exec lint-staged' > .husky/pre-commit.husky/pre-commit:
pnpm exec lint-staged.husky/commit-msg:
pnpm exec commitlint --edit "$1".husky/pre-push:
#!/usr/bin/env sh# Run the unit test suite before pushing so failures surface locally# instead of in CI. Skip with --no-verify if you have a deliberate reason# (e.g. pushing WIP for backup).pnpm run test:unitCurrent Husky hook files are plain shell commands — the
husky.shsourcing boilerplate from older Husky releases is gone.