New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

unused-dep

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unused-dep

Detect and clean up unused dependencies in your TypeScript project effortlessly. This command-line tool analyzes your TypeScript source files, identifies dependencies that are not explicitly imported, and provides a list of unused dependencies. Streamline

  • 1.1.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

unused-dep

Detect and clean up unused dependencies in your TypeScript project effortlessly.

This command-line tool analyzes your TypeScript source files, identifies dependencies that are not explicitly imported, and provides a list of unused dependencies. Streamline your project's dependencies for a cleaner, more efficient codebase.

Usage

Navigate to your TypeScript project directory and run the tool using npx:

npx unused-dep

or using yarn:

yarn dlx unused-dep

Options

  • --packageJson: Path to the package.json file (default: ./package.json).
  • --filesToCheck: Glob pattern for files to check (default: src/**/*.ts).
  • --maxParallelFiles: Maximum number of files to process in parallel (default: 100).

Example:

npx unused-dep --packageJson=./path/to/your/package.json --filesToCheck=./path/to/your/files/**/*.ts --maxParallelFiles=50

or using yarn:

yarn dlx unused-dep --packageJson=./path/to/your/package.json --filesToCheck=./path/to/your/files/**/*.ts --maxParallelFiles=50

Features

  • Efficiently identifies unused dependencies in TypeScript files.
  • Simple command-line interface for quick execution.
  • Supports parallel processing for improved performance.
  • Utilizes a progress bar to track the analysis of multiple files.
  • Compatible with TypeScript projects using npm or yarn.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request.

License

This project is licensed under the GPL-3 License - see the LICENSE file for details.

FAQs

Package last updated on 06 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc