Skip to main content
Deno 2 is finally here 🎉️
Learn more

depcheck

Check for unused dependencies


depcheck, inspired by NPM’s depcheck.

Table of Contents

Quick Start

$ deno run --allow-read='.' https://deno.land/x/depcheck/mod.ts

Documentation

depcheck checks for anny unused dependencies in your project. It will pull dependencies used in deps.ts and tests/deps.ts or test/deps.ts, and check if each one is used within your project.

You can also pass a --clean flag, that will remove these unused export/import statements from your deps.ts files.

Your project must be formatted before hand, and depcheck can do this for you, if you pass --fmt as a flag.

Check For Unused Dependencies

$ deno run --allow-read='.' https://deno.land/x/depcheck/mod.ts

Check, and Remove Those Unused Dependencies

$ deno run --allow-read='.' --allow-write='.' https://deno.land/x/depcheck/mod.ts --clean

Format Your Code Before Checking

$ deno run --allow-read='.' https://deno.land/x/depcheck/mod.ts --fmt
$ deno run --allow-read='.' https://deno.land/x/depcheck/mod.ts --fmt --clean

Contributing

Contributors are welcomed!

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

License

By contributing your code, you agree to license your contribution under the MIT License.