19 lines
438 B
Bash
Executable File
19 lines
438 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Pre-commit hook: typecheck + lint
|
|
# Activated by: make install
|
|
set -euo pipefail
|
|
|
|
echo "[pre-commit] Running typecheck…"
|
|
if ! pnpm run typecheck; then
|
|
echo "[pre-commit] FAILED: typecheck errors — commit blocked." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "[pre-commit] Running lint…"
|
|
if ! pnpm run lint; then
|
|
echo "[pre-commit] FAILED: lint errors — commit blocked." >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "[pre-commit] All checks passed."
|