Optimize Pre-Push Hook for Speed

 Optimized Pre-Push Hook:
- Quick checks only: ESLint, TypeScript, npm audit
- Removed slow tests and build (run in GitHub Actions)
- ~3x faster for small fixes

 Added Full Pre-Push Option:
- npm run pre-push:full for complete checks
- Use for important changes or releases
- Includes tests and build locally

🎯 Best Practices:
- Quick checks locally (30 seconds)
- Full validation in GitHub Actions
- Best of both worlds: speed + thoroughness

📝 Usage:
- Normal pushes: npm run pre-push (fast)
- Important changes: npm run pre-push:full (thorough)
This commit is contained in:
Dennis Konkol
2025-09-06 08:57:31 +00:00
parent 2e91dfc7d5
commit 1d4ae2bd41
3 changed files with 123 additions and 24 deletions

View File

@@ -9,6 +9,7 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"pre-push": "./scripts/pre-push.sh",
"pre-push:full": "./scripts/pre-push-full.sh",
"buildAnalyze": "cross-env ANALYZE=true next build",
"test": "jest",
"test:watch": "jest --watch",