Package Exports
- unused-code-detector
- unused-code-detector/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (unused-code-detector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
unused-code-detector
A command-line tool to find unused variables and functions in JavaScript/TypeScript files.
Installation
npm install -g unused-code-detector
Usage
# Analyze current directory
unused-code-detector
# Analyze specific directory
unused-code-detector ./src
# Analyze with specific file extensions
unused-code-detector --extensions .js,.ts,.tsx
# Generate HTML report
unused-code-detector --html
# Output to specific file
unused-code-detector --output ./report.json
Features
- Finds unused variables and imports
- Supports JavaScript and TypeScript files
- Generates JSON or HTML reports
- Configurable file extensions and ignore patterns
- Interactive mode for reviewing findings
License
MIT © Chiranjhivi Ghimire