🚀 Features
- 🎯 Smart Comment Removal: Remove various comment types while preserving important directives
- ⚙️ Fully Customizable: Add your own regex patterns to remove any text pattern
- 🛡️ Directive Preservation: Automatically preserves ESLint, Biome, TypeScript, and other directives
- 📁 Bulk Processing: Clean single files or entire projects at once
- ⌨️ Keyboard Shortcuts: Quick access with customizable keyboard shortcuts
- 🎨 Multiple Languages: Supports JS, TS, Vue, HTML, CSS, SCSS and more
📥 Installation
From VS Code Marketplace (Coming Soon)
- Open VS Code
- Press
Ctrl+P / Cmd+P
- Type
ext install umairrx.vireo-cleaner
- Press Enter
From VSIX File
- Download the latest
.vsix file from Releases
- Open VS Code
- Press
Ctrl+Shift+P / Cmd+Shift+P
- Type "Install from VSIX"
- Select the downloaded file
Build from Source
git clone https://github.com/umairrx/vireo-cleaner.git
cd vireo-cleaner
pnpm install
pnpm run compile
🎯 Usage
Quick Start
Remove from Current File
- Press
Ctrl+Alt+R (Windows/Linux) or Cmd+Alt+R (Mac)
- Or right-click → "Vireo: Remove Comments from Current File"
Remove from All Files
- Press
Ctrl+Alt+Shift+R (Windows/Linux) or Cmd+Alt+Shift+R (Mac)
- Or Command Palette → "Vireo: Remove Comments from All Project Files"
What Gets Removed?
✅ Regular comments: // comment
✅ Block comments: /* comment */
✅ JSDoc comments: /** comment */
✅ JSX comments: {/* comment */}
✅ Inline comments: code // comment
What Gets Preserved?
❌ // eslint-disable-next-line
❌ // @ts-ignore
❌ // biome-ignore
❌ Any custom directive you configure
Example
Before:
// This is a comment
function hello() {
// eslint-disable-next-line no-console
console.log("Hello"); // inline comment
/* Block comment */
/**
* JSDoc comment
*/
return true;
}
After:
function hello() {
// eslint-disable-next-line no-console
console.log("Hello");
return true;
}
⚙️ Configuration
Vireo Cleaner is fully customizable through VS Code settings. Access settings via File > Preferences > Settings (or Ctrl+,), then search for "Vireo".
Supported File Types
Customize which file extensions are processed when cleaning all files:
{
"vireo.supportedFileTypes": [
"js",
"jsx",
"ts",
"tsx",
"vue",
"html",
"css",
"scss",
"php",
"py"
]
}
Preserved Directives
Configure which comment prefixes should be preserved:
{
"vireo.preserveDirectives": [
"es",
"biome",
"@ts",
"prettier",
"webpack",
"vite"
]
}
Configuration Example
Complete configuration example with all options:
{
"vireo.supportedFileTypes": [
"js",
"jsx",
"ts",
"tsx",
"vue",
"svelte",
"html",
"css"
],
"vireo.preserveDirectives": ["es", "biome", "@ts", "prettier"],
"vireo.regexPatterns": [
{
"name": "Block Comments",
"pattern": "\\/\\*[\\s\\S]*?\\*/",
"description": "Remove /* */ block comments",
"enabled": true
}
]
}
🎨 Supported File Types
- JavaScript (
.js, .jsx)
- TypeScript (
.ts, .tsx)
- Vue (
.vue)
- HTML (
.html)
- CSS (
.css)
- SCSS (
.scss)
Development Setup
# Clone the repository
git clone https://github.com/umairrx/vireo-cleaner.git
cd vireo-cleaner
# Install dependencies
pnpm install
# Compile TypeScript
pnpm run compile
# Watch mode for development
pnpm run watch
# Run tests
pnpm test
Reporting Issues
Found a bug? Have a feature request? Please open an issue.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
⭐ Show Your Support
If you find Vireo Cleaner helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 🤝 Contributing code