npm-package-json-lint-config-auto
raw JSON → 1.1.0 verified Fri May 01 auth: no javascript
Provides a shared, auto-generated base configuration for npm-package-json-lint, ensuring consistent linting of package.json files. Version 1.1.0 introduces customizable rules structure. Released under MIT license by autosoft, it is actively maintained with regular bug fixes and dependency updates. Differentiates from others by being auto-generated and focusing on enforces a specific order of keys including bundleDependencies and bundledDependencies.
Common errors
error Cannot find module 'npm-package-json-lint-config-auto' ↓
cause Trying to import the config directly in a Node.js script.
fix
Do not import the module; use extends in package.json as documented.
error Configuration for rule "order-properties" is invalid ↓
cause Using outdated rule format from previous version.
fix
Update to version 1.1.0 and adjust order rules as per new customizable structure.
error Error: Failed to extend config "npm-package-json-lint-config-auto" ↓
cause Package not installed as devDependency or missing from node_modules.
fix
Run 'npm install --save-dev npm-package-json-lint-config-auto'.
Warnings
breaking Version 1.1.0 introduces customizable rules structure which may break existing configs relying on default structure. ↓
fix Review new rule options and update your package.json lint config accordingly.
gotcha Config must be extended under the 'npmpackagejsonlint' key, not 'npmPackageJsonLint'. ↓
fix Use 'npmpackagejsonlint' exactly as shown.
gotcha The package does not expose any exports; it only provides a JSON config. Do not attempt to import or require it. ↓
fix Use extends in package.json only.
Install
npm install npm-package-json-lint-config-auto yarn add npm-package-json-lint-config-auto pnpm add npm-package-json-lint-config-auto Imports
- default wrong
import or require of the module; this is a JSON config, not a JS module.correctextends: 'npm-package-json-lint-config-auto' in package.json npmpackagejsonlint
Quickstart
// package.json
{
"name": "my-package",
"version": "1.0.0",
"npmpackagejsonlint": {
"extends": "npm-package-json-lint-config-auto"
},
"devDependencies": {
"npm-package-json-lint": "^6.0.0",
"npm-package-json-lint-config-auto": "^1.1.0"
},
"scripts": {
"lint:pkg": "npmPkgJsonLint ."
}
}
// Run validation:
// npm run lint:pkg