word-waltz / files / .githooks / pre-commit
pre-commit
| 1 | #!/bin/sh |
| 2 | # Pre-commit hook: run spell check and type check before allowing a commit. |
| 3 | # Installed automatically via `npm run prepare` (git config core.hooksPath). |
| 4 | |
| 5 | set -e |
| 6 | |
| 7 | echo "→ cspell…" |
| 8 | npx cspell "**" --no-progress |
| 9 | |
| 10 | echo "→ tsc…" |
| 11 | npx tsc --noEmit |
| 12 | |
| 13 | echo "✓ Pre-commit checks passed." |