purecommit
v1.0.1
Published
Purify your commits by automatically removing console.logs and debug comments.
Maintainers
Readme
✨ Features
🛠 How It Works & Edge Cases
PureCommit is designed to be highly flexible. It uses smart regex to ensure it doesn't accidentally delete code you actually need.
1. Case Insensitivity
The tool doesn't care about your casing.
// DEBUG,// Debug, and// debugare all treated the same and removed.// KEEP,// Keep, and// keepall successfully preserve your logs.
2. Flexible Spacing
Whether you write //debug or // debug, PureCommit will find it and clean it.
3. The Rules in Action:
| Code Example | Action | Result in Commit |
| :--- | :--- | :--- |
| console.log("Check this"); | ❌ Remove | Deleted |
| const x = 5; // DEBUG This is just a number | ❌ Remove | const x = 5; |
| console.info("Vital Info"); // keep | ✅ Keep | console.info("Vital Info"); |
| // TODO: fix this debug log | 🛡️ Ignore | Stays exactly as is |
