A description of the bug
We have some gitignore files which add a * to ignore everything and then add back in explicitly what they need with e.g. ! README.md. depcheck doesn't seem to honour these nots and so complains of unused dependencies despite being used
e.g.
# Start by disallowing everything
*
# Now allowlist what we actually want
!thing/
!stuff/
!config/
Code snippets
Where the dependency is used:
code snippet here
Where the dependency is listed in package.json:
package.json snippet here
please include the section name (e.g. devDependencies, dependencies)
Versions
node -v: v18.17.1
npm -v: 9.6.7
depcheck --version: 1.4.7
Extra info
Any extra info you want to include. Thank you for the bug report!
BONUS POINTS: If you wish to help us debug further, the depcheck --json option will show more information. Check here in the README for documentation on json output.
Bug Description
A description of the bug We have some gitignore files which add a
*
to ignore everything and then add back in explicitly what they need with e.g.! README.md
.depcheck
doesn't seem to honour these nots and so complains of unused dependencies despite being usede.g.
Code snippets
Where the dependency is used:
Where the dependency is listed in package.json:
Versions
node -v
: v18.17.1npm -v
: 9.6.7depcheck --version
: 1.4.7Extra info
Any extra info you want to include. Thank you for the bug report!
BONUS POINTS: If you wish to help us debug further, the
depcheck --json
option will show more information. Check here in the README for documentation on json output.