# Pre-commit Quality Gate Hook
```bash
#!/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!"
```
## Installation
1. Save to `.git/hooks/pre-commit`
2. Make executable: `chmod +x .git/hooks/pre-commit`
## Requirements
- Git
- Node.js
- npm
## Integrations
- ESLint for linting
- TypeScript for type checking
- Jest/Vitest for testing
- npm audit for security
This hook prevents commits with quality issues, ensuring clean code in your repository.