#!/bin/sh echo "Running pre-commit checks..." echo "Linting staged files..." pnpm biome check --staged --no-errors-on-unmatched if [ $? -ne 0 ]; then echo "Lint failed — run \`pnpm lint\` to fix, then re-stage the files." exit 1 fi echo "Type checking..." pnpm run test:types if [ $? -ne 0 ]; then echo "Type check failed. Fix errors before committing." exit 1 fi echo "Pre-commit checks passed."