OptimizeGuard is a lightweight **code optimization guard** that helps developers check whether their code is **optimized, safe, and type-correct before committing or pushing**.
npm install @sujithx1/optimizeguardOptimizeGuard is a lightweight code optimization guard that helps developers check whether their code is optimized, safe, and type-correct before committing or pushing.
It runs with one simple command and gives clear, human-readable feedback โ no complex setup needed.
---
Many code issues are found after pushing or during code review.
OptimizeGuard catches them early, right on your machine.
โ Faster feedback
โ Cleaner commits
โ Better code quality
โ Developer-friendly output
---
await inside loopsanyeval() and unsafe executions---
```bash
npm install -g @sujithx1/optimizeguard
โถ๏ธ Usage
optimizeguard
Example output
โ OptimizeGuard failed
โข Performance issue: await inside loop (src/api/user.ts)
โข Type issue: usage of 'any' (src/services/auth.ts)
Fix the issues and try again.
If everything is good:
โ
OptimizeGuard passed
Your code is optimized and safe to commit ๐
๐ Use as Pre-Commit Hook (Recommended)
Automatically block bad commits.
npx husky add .husky/pre-commit "optimizeguard"