pkg-doctor

Find Unused Dependencies in your JavaScript/TypeScript projects

Basic Commands:

Install globally, once:

$ npm install -g pkg-doctor

Install in project:

$ npm install -D pkg-doctor

Run:

$ pkg-doctor

Flags:

--include-all:

$ pkg-doctor --include-all

Some dependencies are not considered as unused by default such as tailwindcss, postcss, vitest, webpack etc because they are not usually imported in source files. To bypass this check use --include-all flag

--include-types:

$ pkg-doctor --include-types

Types packages are excluded by default. To bypass this check use --include-types flag

Strict Check:

$ pkg-doctor --include-types --include-all

Using --include-types and --include-all together will bypass all checks and give you the most possible raw output

Use with:

/icons/frameworks/reactjs.svg-framework-icon
/icons/frameworks/nextjs.svg-framework-icon
/icons/frameworks/astrojs.svg-framework-icon
/icons/frameworks/vue.svg-framework-icon
/icons/frameworks/svelte.svg-framework-icon
/icons/frameworks/nodejs.svg-framework-icon
/icons/frameworks/js.svg-framework-icon
/icons/frameworks/ts.svg-framework-icon