remove_unused_imports
Cleans up JavaScript/TypeScript code by automatically detecting and removing unused import statements. Helps optimize bundle size, comply with linting rules, and streamline code maintenance during development or refactoring.
Instructions
Automatically remove unused import statements to clean up code. Safely detects which imports are actually used.
Examples: • Bundle size optimization: remove_unused_imports() to reduce bundle size • Code cleanup: remove_unused_imports() after refactoring • Linting compliance: remove_unused_imports() to fix ESLint warnings • Before deployment: remove_unused_imports({preview: true}) to see what will be removed • Legacy cleanup: remove_unused_imports() after removing old code • Development workflow: remove_unused_imports() during feature development
Input Schema
Name | Required | Description | Default |
---|---|---|---|
preview | No | Return preview only without applying changes (default: false). Use to see what will be removed. |