Dead Component Detector
Detects unused React components in your workspace and shows them in a sidebar tree.
Features
- Scans your workspace for React components (
.js, .jsx)
- Detects components that are never imported or used anywhere
- Shows dead components in a sidebar tree view
- Click to open unused component files
- Configurable include/exclude patterns
- Optional diagnostics in the Problems panel
Requirements
VS Code 1.85+
Extension Settings
This extension contributes the following settings:
deadComponentDetector.include: Glob patterns for candidate component files.
deadComponentDetector.exclude: Glob patterns to exclude from scanning.
deadComponentDetector.onlyPascalCase: Only treat PascalCase filenames as components.
deadComponentDetector.showDiagnostics: Show dead components in Problems panel.
Usage
- Open a React project
- Open the Dead Components sidebar
- Click the refresh button to scan
- Unused components appear in the list
Known Issues
- Does not detect components used through dynamic imports
- Filename-based detection may miss some cases
- Barrel exports (
index.js) are not handled yet
Release Notes
0.0.1
Initial release of Dead Component Detector.
Enjoy!
| |