Registry / testing / eslint-plugin-json-schema-validator

eslint-plugin-json-schema-validator

JSON →
library6.2.0jsnpmunverified

ESLint plugin that validates JSON, JSONC, JSON5, YAML, TOML, JavaScript, and Vue custom blocks against JSON Schema. Current stable version is 6.2.0 (released 2025-06-10). Requires ESLint >=9.38.0 and Node.js >=20.19.0 (20.x), >=22.13.0 (22.x), or >=24. Actively maintained with monthly releases. Key differentiator: validates structured data formats using JSON Schema within ESLint flat config, supporting multiple data languages and schema from SchemaStore.

testingserialization
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.

ESM-only since v6.0.0 with Node >=20.19.0. Default import provides the plugin object with configs.

import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator'

Flat config only since v6.0.0. The flat/ prefix is deprecated but still works as alias.

export default [ ...eslintPluginJsonSchemaValidator.configs.recommended ]

Direct import of rules map for custom config is supported.

import { rules } from 'eslint-plugin-json-schema-validator'

ESLint flat config using recommended configuration; validates JSON, YAML, and TOML against JSON Schema.

// eslint.config.js import eslintPluginJsonSchemaValidator from 'eslint-plugin-json-schema-validator'; export default [ ...eslintPluginJsonSchemaValidator.configs.recommended, { rules: { 'json-schema-validator/no-invalid': 'warn' } } ]; // Run: npx eslint --ext .json,.yaml,.toml src/
Debug
Known footguns
breakingESLint plugin requires ESLint >=9.38.0 and Node.js >=20.19.0/22.13.0/>=24.0.0
breakingv6.0.0 dropped support for older ESLint versions; requires flat config only (eslint.config.js).
breakingv6.0.0 replaced require() with ESM imports; CommonJS require() will fail.
gotchaPlugin does not validate .js files by default; only JSON, YAML, TOML, and Vue SFC.
deprecatedThe flat/ prefix in configs (e.g., configs['flat/recommended']) is deprecated in v6.
gotchaSchemaStore URLs are normalized to www.schemastore.org; custom URLs may not be recognized.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
script
1
bytedance
1
Resources