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
I have my main package.json in the project root containing all my dependencies.
I also have a package.json in the app directory (which is where most of the code is), containing only { "name": "app" }.
This allows me to import files using the import from 'app/modules/...' syntax anywhere in the project.
The problem is that running depcheck in the root of the project reports that every dependency used in the app folder is unused, but when I remove app/package.json it reports the dependency usage correctly.
To be honest I don't think I'll work on this. It's a hack for making some babel plugin work, it would be better if the babel plugin fixed this issue so that you don't have to create random pakage.json files in your project.
Bug Description
When using multiple
package.json
files in folders of a projectdepcheck
cannot properly check imports within those folders.I am using multiple
package.json
files to achieve absolute import paths (becausebabel-plugin-module-resolver
doesn't work well withreact-native
).package.json
in the project root containing all my dependencies.package.json
in theapp
directory (which is where most of the code is), containing only{ "name": "app" }
.import from 'app/modules/...'
syntax anywhere in the project.The problem is that running
depcheck
in the root of the project reports that every dependency used in theapp
folder is unused, but when I removeapp/package.json
it reports the dependency usage correctly.Versions
node -v
: v12.4.0npm -v
: 6.9.0depcheck --version
: 0.8.4JSON Output
With
app/package.json
fileWithout
app/package.json
fileThe text was updated successfully, but these errors were encountered: