#!/bin/bash
set -e
echo "Running pre-commit quality checks..."
# Lint
echo "Linting..."
npm run lint
# Type check
echo "Type checking..."
npm run type-check
# Tests
echo "Running tests..."
npm test
# Security scan
echo "Security scan..."
npm audit
echo "All checks passed!"
.git/hooks/pre-commitchmod +x .git/hooks/pre-commitThis hook prevents commits with quality issues, ensuring clean code in your repository.