Configurable linter for package.json files. Version 10.3.0 requires Node >=22 and npm >=10. Enforces standards like valid data types, lowercase names, valid semver, presence of required fields, and dependency correctness. Ships TypeScript types and supports both CLI and programmatic usage with flat config (ESLint-style) since v10.0.0. Frequent releases; actively maintained.
npm install npm-package-json-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Programmatic usage: instantiate Linter with rules, lint package.json, and log issues.
Upgrade Node.js to version 22 or higher.
Use ESM imports and flat config format. See migration guide.
Upgrade Node.js to version 20 or higher (or 22 for v10+).
Upgrade Node.js to version 18 or higher.
Use 'prefer-alphabetical' rule instead.
Use ESM import: import { Linter } from 'npm-package-json-lint';Use named imports: import { lintFiles } from 'npm-package-json-lint';Import Linter as a named export: import { Linter } from 'npm-package-json-lint';