Assist_Design/.husky/pre-commit

21 lines
518 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# Run type checking
pnpm type-check
# Run linting
pnpm lint
# Quick security check (only fail on high/critical vulnerabilities)
echo "🔒 Running security audit..."
if ! pnpm audit --audit-level=high > /dev/null 2>&1; then
echo ""
echo "⚠️ High or critical security vulnerabilities detected!"
echo "Run 'pnpm audit' to see details and 'pnpm update' to fix."
echo ""
# Uncomment the line below to block commits with vulnerabilities:
# exit 1
fi