dylang/npm-check

Npm-check 5.1 is too zealous while looking for missing modules

Open

#123 aperta il 4 apr 2016

Vedi su GitHub
 (12 commenti) (7 reazioni) (0 assegnatari)JavaScript (278 fork)batch import
help wantedissue is in a dependencywho else wants this?

Metriche repository

Star
 (6438 star)
Metriche merge PR
 (Merge medio 5h 4m) (6 PR mergiate in 30 g)

Descrizione

Hello! First of all, thanks for your work, I love this helper as I love to keep my projects with depencies up to date!

Anyway since updating to 5.1 I noticed an annoying behaviour: npm-check is starting to look for modules everywhere, even in .eslintrc or karma.conf.js!

The worst part is that I use webpack resolve's modulesDirectories options to load my modules with absolute paths from the root of my project, so I have a lot of this calls:

import Header from 'components/header' or import * as api from 'utils/api'

Before 5.1 they were ignored, while now they are all caught making the report unreadable:

actions                             �  MISSING!  Not installed.
                                        �  PKG ERR!  Not in the package.json. Found in: \src\scripts\actio
ns\animations.js, \src\scripts\actions\blocks.js, \src\scripts\actions\currentConversation.js, \src\script
s\actions\mail.js, \src\scripts\components\Main.jsx...

and so on.

I tried also with the -s flag but it skips a lot of modules so it's not viable either.

Guida contributor