⚡ 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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user