You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@KaboomFox looks like you don’t understand the concept of DefinitelyTyped. Let me explain: it’s not used anywhere in the project code. It’s used by TypeScript server (for TypeScript compiler and IDEs). It’s needed so the libraries which don’t have types still may define its types from external packages.
So if I have library X without types, I may install @types/X - and types are there (no additional configuration, nor import is needed)
So if I have listed @types/Y but I don’t have listed Y package itself - then it should be considered “not using”
That was a long answer. Short answer to your question:
Bug Description
All the
@types/*
libraries in devDependencies are counted as "unused".How it should work
depcheck
should look intodependencies
list and see if there's a library for that. For example:I have added following packages to
devDependencies
:And I have the following packages in my
dependencies
:depcheck
should subtract these, and only count following packages as "unused":Versions
node -v
: 10.16.0npm -v
: 6.9.0depcheck --version
: 0.8.3The text was updated successfully, but these errors were encountered: