A Visual Studio Code extension that removes all comments from TypeScript and JavaScript files.
Usage
- Open a TypeScript or JavaScript file in VS Code
- Right-click in the editor
- Select "Remove Comments" from the context menu
- In the Explorer panel, select one or more TypeScript/JavaScript files
- Right-click on the selected files
- Select "Remove Comments"
The extension will process the files and remove all single-line (//) and multi-line (/* */) comments, preserving the code structure and formatting.
Features
- Remove comments from the current open file
- Remove comments from multiple selected files in the Explorer
- Supports TypeScript (.ts, .tsx) and JavaScript (.js, .jsx) files
- Preserves code formatting and structure
- Uses TypeScript's scanner for accurate comment detection
Installation
- Download the
.vsix file from the releases
- In VS Code, go to Extensions > Install from VSIX...
- Select the downloaded file
Alternatively, you can package it yourself:
npm install
npm run compile
vsce package
Then install the generated .vsix file.
Requirements
- Visual Studio Code 1.74.0 or higher
Development
To develop this extension:
- Clone the repository
- Run
npm install
- Open in VS Code
- Press F5 to launch extension development host
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.
| |