Unused Code Hunter Pro: Dead Imports & Code Cleaner 🧹
Detect and clean unused dependencies, dead imports, and orphaned functions across JavaScript, TypeScript & Python workspaces!
Keep your bundles lean, compilation fast, and codebases clutter-free with 1-click batch cleanup.
🧹 Why Unused Code Hunter Pro?
Over months of active development and refactoring, projects inevitably accumulate:
Ghost Dependencies: Packages remaining in package.json that are never imported anywhere.
Dead Imports: Leftover import { a, b, c } specifiers that add bundle bloat and linter noise.
Orphaned Exports: Exported helper functions and classes that are no longer referenced by any file in the workspace.
Unused Code Hunter Pro provides an automated, non-destructive audit engine right inside VS Code:
⚡ 1-Click Workspace Scan: Press Alt + Shift + U (Cmd + Shift + U on macOS) to audit your entire workspace in milliseconds.
📦 Dependency Pruning: Discovers unused packages in dependencies and devDependencies and generates a 1-click npm uninstall command.
🧹 Safe Import Removal: Clean single files or batch-clean imports with zero risk—every edit hooks into VS Code's standard Undo stack (Ctrl + Z).
📁 Explorer Tree View: Integrated sidebar tree under VS Code Explorer to browse unused code by category.
🌐 Interactive Dashboard: Full-screen visual report with metrics, filter tabs, and direct jump-to-line navigation.
⌨️ Keyboard Shortcuts & Commands
Command
Shortcut
Description
Scan Workspace for Dead Code
Alt + Shift + U / Cmd + Shift + U
Scans all workspace files and displays the interactive dashboard
Scan Active File for Unused Imports
Via Right Click / Command Palette
Scans the currently open editor file for dead imports
Remove Unused Imports in Active File
Via Right Click / Command Palette
Safely removes all unused import specifiers from the active file
⚙️ Configuration Options
Customize scanner behavior in your VS Code Settings:
unusedCodeHunter.ignorePatterns: Glob patterns to ignore (default: {**/node_modules/**,**/dist/**,**/out/**,**/.git/**,**/*.vsix,**/*.lock}).
unusedCodeHunter.scanDependencies: Enable/disable scanning of package.json dependencies (default: true).