npm-package-json-lint-config-package

raw JSON →
0.1.0 verified Fri May 01 auth: no javascript

Shareable npm-package-json-lint configuration for packages. Version 0.1.0 provides a set of linting rules for package.json files, intended for personal or small-scale use. It extends the base npm-package-json-lint tool (peer dependency >=7.1.0) and requires Node >=18.0.0. The configuration is minimal and can be extended or overridden. The package is maintained by a single author and follows a low release cadence. Key differentiator: purpose-built for packages rather than general projects, but lacks the broad community support of alternatives like stylelint's config.

error Cannot find module 'npm-package-json-lint'
cause Peer dependency npm-package-json-lint not installed.
fix
npm install --save-dev npm-package-json-lint@^7.1.0
error Configuration for rule "valid-values-license" is invalid
cause Rule options not compatible with this config; likely a version mismatch.
fix
Ensure npm-package-json-lint is >=7.1.0 and config is latest
gotcha Requires npm-package-json-lint >=7.1.0 as a peer dependency; failing to install it will cause the CLI to fail.
fix Run 'npm install --save-dev npm-package-json-lint@^7.1.0'
deprecated Version 0.1.0 is very early; semver-major changes may occur without notice.
fix Pin exact version or use tilde range ~0.1.0
gotcha Configuration is intended for packages; may not be suitable for monorepos or non-package projects.
fix Override rules per project need; see npm-package-json-lint docs
breaking Node >=18.0.0 required; older Node versions will fail.
fix Upgrade Node to >=18.0.0
npm install npm-package-json-lint-config-package
yarn add npm-package-json-lint-config-package
pnpm add npm-package-json-lint-config-package

Install the linter and config, create config file, and lint package.json.

npm install --save-dev npm-package-json-lint npm-package-json-lint-config-package
echo '{"extends":"npm-package-json-lint-config-package"}' > .npmpackagejsonlintrc.json
npx npm-package-json-lint package.json