Registry / testing / eslint-plugin-json-es

eslint-plugin-json-es

JSON →
library1.6.0jsnpmunverified

eslint-plugin-json-es provides a robust JSON parser for ESLint, enabling developers to lint JSON files using many standard ESLint rules. The current stable version is `1.6.0`, with a release cadence that includes regular dependency updates and feature additions. A key differentiator of this plugin is its use of ESLint's internal `espree` parser, which allows it to leverage a significant number of existing ESLint rules directly on JSON content. This contrasts with alternatives like `eslint-plugin-json` that rely on VSCode's JSON validation and offer less extensibility, or `eslint-plugin-jsonc` which uses custom AST node types. It supports autofixing and custom rules, making it a versatile choice for integrating JSON linting into an existing ESLint workflow.

npm install eslint-plugin-json-es
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-JSON
E
eslint-plugin-json-es
testingjavascriptv1.6.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parser
"parser": "eslint-plugin-json-es"
"parser": "json-es"
Configures ESLint to use this plugin as the parser for specific files (e.g., *.json). Always use the full package name.
extends
"extends": "plugin:eslint-plugin-json-es/recommended"
"extends": "eslint-plugin-json-es/recommended"
Applies the recommended set of rules provided by the plugin. The 'plugin:' prefix is crucial.
rule definition
"json-es/use-camel-case": "error"
"use-camel-case": "error"
When enabling specific rules provided by this plugin, they must be prefixed with `json-es/`.

Configures ESLint in a `.eslintrc.json` file to use `eslint-plugin-json-es` as the parser for all `.json` files, applying its recommended rules and an additional custom rule.

{ "overrides": [{ "files": ["*.json"], "parser": "eslint-plugin-json-es", "extends": "plugin:eslint-plugin-json-es/recommended", "rules": { "json-es/use-camel-case": "error", "indent": ["error", 2] } }] }
Debug
Known issues
breakingNode.js 16.x is no longer officially supported as of version 1.6.0. It may or may not work.
fix
Upgrade your Node.js environment to version 18.x, 20.x, or 22.x for guaranteed compatibility and support.
affects: >=1.6.0
breakingThis plugin requires ESLint version 7 or higher. Older ESLint versions are not supported.
fix
Ensure your project's `eslint` peer dependency is `^7.0.0` or newer. Update ESLint to a compatible version if necessary.
affects: <1.0.0
gotchaWhile the plugin allows many existing ESLint rules to work with JSON, not all JavaScript-centric rules make logical sense or function correctly for JSON files. Applying inappropriate rules can lead to unexpected errors or irrelevant linting suggestions.
fix
Review the plugin's documentation and 'recommended' configuration. Enable only those ESLint rules that are suitable for JSON syntax, or create custom rule sets specific to your JSON linting needs.
affects: *
Errors
Common errors & fixes
Parsing error: ESLint was configured to run on JSON files but encountered a JavaScript file instead.
The `files` array in the ESLint `overrides` configuration is too broad, causing the JSON parser to be applied to non-JSON files.
fix
Refine the `files` array in your `.eslintrc.json` overrides block to specifically target JSON files, e.g., `"files": ["*.json"]` or `"files": ["**/*.json"]`.
ESLint couldn't find the plugin "eslint-plugin-json-es".
The plugin package is either not installed, or ESLint cannot resolve its path.
fix
Ensure the plugin is installed as a development dependency: `npm install eslint-plugin-json-es --save-dev`. Verify that your `.eslintrc.json` correctly references the plugin, especially in the `parser` and `extends` fields.
Configuration for rule 'json-es/non-existent-rule' is invalid:...
The specified rule name is incorrect, misspelled, or the rule does not exist within the `eslint-plugin-json-es` package.
fix
Double-check the rule name against the plugin's documentation. Ensure that any custom rules from this plugin are correctly prefixed with `json-es/` (e.g., `json-es/use-camel-case`).
Upgrade
Version history
1.6.0latest on npm
Audit
Dependencies
eslintrequiredRequired peer dependency for ESLint functionality and version compatibility.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-json-es — npm install eslint-plugin-json-es · libregistry