WIP - Lint your npm package
Lint your npm package
Makes sure your package is unicorn good.
npm install -g npmlint
Go to the package you want to lint and run
You can also use it programmatically.
Install it locally
npm install --save npmlint.
const npmlint = require'npmlint';console.lognpmlint;//=> ['suggestion', 'another suggestion']
You can try it out by
cd'ing into the
test folder and running
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
error. Use your best judgement
message: a message describing the violation
MIT © Sindre Sorhus