Problem: How do I find unused packages in package.json
Problem: How do I find unused packages in package.json?
Answer: Use depcheck.
It reports unused packages, and reports packages that should be installed. 👍
I just found over a dozen packages I wasn't using and thus, needlessly installing!
https://www.npmjs.com/package/depcheck
Why I'm using it: I'm converting a monolith into a @turborepo monorepo.
I'm using depcheck to audit each new package.json's dependencies. This assure each package only references packages that it's actually using.