#!/usr/bin/env bash
# Pre-push hook: typecheck + lint (same as pre-commit, catches anything that slipped through)
# Activated by: make install
set -euo pipefail

echo "[pre-push] Running typecheck…"
if ! pnpm run typecheck; then
  echo "[pre-push] FAILED: typecheck errors — push blocked." >&2
  exit 1
fi

echo "[pre-push] Running lint…"
if ! pnpm run lint; then
  echo "[pre-push] FAILED: lint errors — push blocked." >&2
  exit 1
fi

echo "[pre-push] All checks passed."
