remove_unused_imports
Remove unused import statements to optimize bundle size, ensure linting compliance, and clean up code during development. Safely detects and eliminates unnecessary imports.
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. |