npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

Linting for commonly terrible practices on prepublish #100

Closed parris closed 9 years ago

parris commented 9 years ago

I'd like to request a built in linting job that the npm client would run on prepublish.

Some thoughts on what should be linted: A) packages without .npmignores B) a warning if the package size is above 1mb in size C) packages without readmes

I could think of more. As of right now, looking at our node_modules folder size it is consuming over 200mb of space. At one point it was 500mb. We noticed things like mp4 files in there inside of an examples directory.

The node modules folder of our repo is bigger than our entire ~1million line gitrepo with history and I think that's mostly due to nesting, and people packaging poorly. Dedupe reduces it to 200mb. Zipping drops it to 50mb. At minimum a linting job would help here.

othiym23 commented 9 years ago

I'm not averse to npm linting packages before publishing, but that's functionality that belongs in the CLI (or potentially in the registry), not npm-registry-client. The registry client's sole concern is getting data to and from the registry across the network.