Closed robintown closed 2 months ago
Thanks for the report. Yeah, that makes sense. There's quite some string comparisons/refs to /node_modules/
. Fixing this would require to actually follow the fs link, etc. Not sure if it's worth fixing this in terms of both code complexity and performance given the use case/situation in which the simplicity fails.
Decided to close this as "wontfix", due to reasons described.
Prerequisites
Reproduction url
https://stackblitz.com/edit/github-jj73er
Reproduction access
Description of the issue
I am seeing false positives for dependencies that are soft-linked into node_modules from somewhere else on the file system. This can happen when using package manager features such as
npm link
to work on an application and a library simultaneously, for instance.To reproduce: go to the link above and,
test-2
is flagged as an unused dependency even though it is imported in index.ts.test-1/node_modules/test-2
is a soft link totest-2
.