A VSCode extension that helps you remove comments and console logs from your code files. This extension supports JavaScript, TypeScript, React, CSS, HTML, and Python files.
Features
Remove comments from various file types
Remove both comments and logs at once
Works on single files or all files in the workspace
Preserves code structure and formatting
Undo changes per file using VSCode's undo functionality
Usage
Working on a Single File
Open the file you want to process
Right-click in the editor
Choose one of these options:
"Remove Comments (Current File)"
"Remove Console Logs (Current File)"
"Remove Comments and Logs (Current File)"
Working on All Files
Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) to open the command palette
Type one of these commands:
"Remove Comments (All Files)"
"Remove Console Logs (All Files)"
"Remove Comments and Logs (All Files)"
Example
Before:
// This is a test function
function example() {
// This is a comment inside a function
console.log('This is a test log');
/* This is a multi-line
comment */
console.debug('Debug message');
// Another comment
return true;
}
After:
function example() {
return true;
}
Contributing
I appreciate all contributions, feel free to submit a pull request!