Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Vireo CleanerNew to Visual Studio Code? Get it now.
Vireo Cleaner

Vireo Cleaner

umairrx

| (1) | Free
A lightweight utility to automatically clean code by removing unwanted comment patterns using customizable regex rules.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
Vireo Cleaner Logo

Vireo Cleaner

Clean up your code by intelligently removing comments

VS Code Version License: MIT GitHub Issues GitHub Stars

Features • Installation • Usage • Configuration • Contributing


🚀 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)

  1. Open VS Code
  2. Press Ctrl+P / Cmd+P
  3. Type ext install umairrx.vireo-cleaner
  4. Press Enter

From VSIX File

  1. Download the latest .vsix file from Releases
  2. Open VS Code
  3. Press Ctrl+Shift+P / Cmd+Shift+P
  4. Type "Install from VSIX"
  5. 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

  1. Remove from Current File

    • Press Ctrl+Alt+R (Windows/Linux) or Cmd+Alt+R (Mac)
    • Or right-click → "Vireo: Remove Comments from Current File"
  2. 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

  • Built with VS Code Extension API
  • Inspired by the need for cleaner, more maintainable code

📞 Support

  • 📧 Email: Create an issue
  • 💬 Discussions: GitHub Discussions
  • 🐛 Bug Reports: Issue Tracker

⭐ Show Your Support

If you find Vireo Cleaner helpful, please consider:

  • ⭐ Starring the repository
  • 🐛 Reporting bugs
  • 💡 Suggesting new features
  • 🤝 Contributing code

Made with ❤️ by Umair

Report Bug • Request Feature

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft