Neighborly Package Megalodon
Publish your own packages to the world's most popular software ecosystem with npm Pro.Get started »

This package has been deprecated

Author message:

It was a good idea, but I never had time to finish it

npmlint

0.1.0 • Public • Published

npmlint Build Status

Lint your npm package

Makes sure your package is unicorn good.

WIP: This is a code dump of something I made 2 years ago, but never had the time to finish. There are lots of things that could have been done better, so I'd like to improve the core before beginning to accept rules. It's also incomplete and lots of bugs right now.

Install

$ npm install --global npmlint

Usage

Go to the package you want to lint and run npmlint.

API

$ npm install --save npmlint
const npmlint = require('npmlint');
 
console.log(npmlint());
//=> ['suggestion', 'another suggestion']

Dev

You can try it out by cd'ing into the test folder and running ../cli.js

Creating rules

Rules are located in a rules directory. These are loaded automatically.

A rule is initiated with an object containing:

  • cwd: the current working directory
  • pkg: the target package' package.json

It's expected to return an object or an array of object containing:

  • name: a slug name for the rule
  • severity: info, warn, error. Use your best judgement
  • message: a message describing the violation

License

MIT © Sindre Sorhus

Install

npm i npmlint

DownloadsWeekly Downloads

13

Version

0.1.0

License

MIT

Last publish

Collaborators

  • avatar