Hey! I'm new to knip but I've been really impressed with it so far, so firstly just wanted to say thanks for the time and effort in maintaining this. It's an awesome tool β€οΈ
So, I have a potentially weird use-case... At the moment, if I run knip against a bunch of built files, anything that is explicitly added as dependency in package.json is (correctly) not deemed to be missing.
But lets say I'm less concerned with whether or not imports are actually deemed to be "missing", I just want to get back a list of all the imports from statically analysing a bunch of files. The idea being that i can then use that list of modules to know exactly what should be in a stripped-back node_modules
folder.
I can get this to work in a rudimentary way simply by commenting out this line. Of course doing that, everything is grouped under "unlisted".
There's more than one way to solve this I think:
package
object to override the local package.json
β depcheck exposes this option, and it works welllisted
deps as well as unlisted
β but I appreciate this isn't the problem knip sets out to solve. But it could still be useful for folks who want to analyse imports and still get the other benefits knip bringsI'd be happy to open a PR for this if I can get it working. Apologies if this has been asked before, or if there's a way to do it already. I struggled to find anything when searching.
Thanks!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too