charlierudolph / dependency-lint

Lints NPM dependencies and devDependencies
MIT License
14 stars 6 forks source link

Modules listed in transpilers should implicitly be allowUnsued #18

Closed alexdavid closed 8 years ago

alexdavid commented 8 years ago

If I am building my project in a compile-to-js language, I'm probably going to want that package as a devDependency for my build script, but I'm most likely not going to be requiring it anywhere in my project.

I think dependency lint should automatically include any modules listed under transpilers in the allowUnused section.

Thoughts?

charlierudolph commented 8 years ago

I'd be fine with that. The build script should allow dependency-lint to see its use, but this sounds correct in the case that the user hasn't added a build script yet.

alexdavid commented 8 years ago

Yeah, that's a good point. This mostly came about from @kevgo's new convention of not using npm's scripts block, but instead using shell scripts in bin/

charlierudolph commented 8 years ago

For shell scripts, dependency lint could just search for the executable in the file. Could be new options shellScriptPatterns and devShellScriptPatterns.

kevgo commented 8 years ago

+1 on shellScriptPatterns

charlierudolph commented 8 years ago

Added in the ability to search shell scripts for module executables. Since that lack was the original reason for this request, can you try that out and see if this is still needed?

charlierudolph commented 8 years ago

@alexdavid any thoughts on my previous comment?

alexdavid commented 8 years ago

I haven't had a chance to try this out yet since I've been using package.json scripts. @kevgo uses shell scripts though. Have you had a chance to try this out Kevin?

kevgo commented 8 years ago

That seems to work well. Thanks!

charlierudolph commented 8 years ago

Closing this out as it appears to be resolved. Please reopen if you want to discuss more