Lint every package.json in seconds
Pick the rules you care about, run the CLI, and get clear errors and warnings.
.npmpackagejsonlintrc.json
{
"rules": {
"require-license": "error",
"require-repository": "error",
"no-caret-version-dependencies": "warning"
}
}Terminal
$ npmPkgJsonLint .
./package.json
ERROR require-license - node: license - license is required
WARNING no-caret-version-dependencies - node: dependencies - Please do not use ^
1 error
1 warningMonorepo support
npm-package-json-lint is capable of scanning projects with multiple package.json files.
Lint a monorepoBuilt to fit your workflow
Over 120 rules, opt-in by design, and easy to run anywhere Node.js runs.
Shareable config
Shareable config allows you to create your own reusable module or consume someone else's module to enforce rules.
Nothing on by default
npm-package-json-lint does not have any rules enabled by default.
Ignore support
You might not want to lint all package.json files in your project. Ignore support allows you to easily specify what files to skip.
Node.js API
All of npm-package-json-lint's CLI functionality is also exposed via a Node.js API.
Ready to tidy up your package.json files?
Check out the documentation to learn more.
Graphic design by Isak Knivsland. Thanks for the great illustrations!