eslint-package-json weekly downloads statistics
By sindresorhus (6 listings) · npm · ESLint plugins
Powerful ESLint rules for package.json
eslint-package-json has 50,067 recorded weekly downloads on npm, an increase of 7.7% over the past 30 days, ranking #784 of 3,247 tracked listings.
About eslint-package-json
eslint-package-json
Powerful ESLint rules for
package.json
Lint and autofix your package.json files with ESLint, powered by @eslint/json.
This plugin catches real package.json mistakes (invalid names, bad version ranges, broken exports, misplaced @types/*, redundant files entries, and more) and fixes many of them automatically.
Install
npm install --save-dev eslint eslint-package-json
Requires ESLint >=10.4, flat config, and ESM.
Usage
Add the recommended config to your eslint.config.js:
import {defineConfig} from 'eslint/config';
import packageJson from 'eslint-package-json';
export default defineConfig({
files: ['**/package.json'],
plugins: {
'package-json': packageJson
},
extends: [
'package-json/recommended'
]
});
This lints every package.json in your project. To tweak individual rules, add them to the same config object:
import {defineConfig} from 'eslint/config';
import packageJson from 'eslint-package-json';
export default defineConfig({
files: ['**/package.json'],
plugins: {
'package-json': packageJson
},
extends: [
'package-json/recommended'
],
rules: {
'package-json/dependency-version-range': [
'error',
{
range: 'caret'
}
]
}
});
If you prefer to wire it up manually instead of using a preset:
import json from '@eslint/json';
import {defineConfig} from 'eslint/config';
import packageJson from 'eslint-package-json';
export default defineConfig({
files: ['**/package.json'],
language: 'json/json',
plugins: {
json,
'package-json': packageJson
},
rules: {
'package-json/valid-fields': 'error'
}
});
Configs
recommended— Enables the rules that catch real, uncontroversial mistakes.all— Enables every rule. Useful for discovering rules; not recommended for everyday use.
Rules
<!-- begin auto-generated rules list -->💼 Configurations enabled in.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
| Name | Description | 💼 | 🔧 | 💡 |
|---|---|---|---|---|
| consistent-name-casing | Enforce kebab-case for keys in scripts and bin objects. | |||
| consistent-path-prefix | Enforce consistent ./ prefix on local path fields. | ✅ | 🔧 | 💡 |
| dependency-version-range | Enforce a consistent version range style for dependencies. | ✅ | 💡 | |
| description-format | Enforce formatting of the description field. | 🔧 | ||
| no-absolute-paths | Disallow absolute paths in path fields. | ✅ | 💡 | |
| no-absolute-paths-in-scripts | Disallow absolute paths in scripts. | ✅ | ||
| no-backslash-paths | Enforce forward slashes in path fields. | ✅ | 🔧 | 💡 |
| no-core-module-dependencies | Disallow dependencies that shadow Node.js built-in modules. | ✅ | 💡 | |
| no-deprecated-fields | Disallow fields and scripts that npm has deprecated. | ✅ | ||
| no-dist-tag-dependencies | Disallow dist-tags as dependency specifiers. | ✅ | ||
| no-duplicate-dependencies | Disallow a dependency listed in multiple dependency groups. | ✅ | 🔧 | 💡 |
| no-empty-fields | Disallow empty fields. | ✅ | 💡 | |
| no-exact-peer-dependencies | Disallow exact versions for peer dependencies. | 💡 | ||
| no-exports-trailing-slash | Disallow trailing-slash folder mappings in exports/imports. | ✅ | 💡 | |
| … |
Description from the npm listing.
- eslint
- eslintplugin
- eslint-plugin
- package.json
- package-json
- npm
- manifest
- linter
- lint
- json
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm ESLint plugins plugins
All 20 eslint-package-json alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/eslint-package-json. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.