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.
npm install eslint-plugin-json-schema-validatorVerified import paths — ran on the pinned version, not inferred.
ESLint flat config using recommended configuration; validates JSON, YAML, and TOML against JSON Schema.
Update ESLint: npm install eslint@^9.38.0 --save-dev; ensure Node.js >=20.19.0 (20.x) or >=22.13.0 (22.x) or >=24.0.0.
Migrate from .eslintrc to eslint.config.js using flat config format.
Convert all require('eslint-plugin-json-schema-validator') to import statements. Ensure package.json has 'type': 'module' or use .mjs extension.If you need to validate JSON Schema in JS files, ensure they are processed by ESLint with appropriate parser settings (e.g., @babel/eslint-parser).
Use configs.recommended directly instead of configs['flat/recommended'].
Ensure custom schema URLs are valid and not blocked by normalization. Use local schema files if normalization causes issues.
Rename eslint.config.js to eslint.config.mjs or add 'type': 'module' to package.json.
Install or update: npm install eslint-plugin-json-schema-validator@latest --save-dev; ensure ESLint >=9.38.0.
Use 'warn' (string) or 1 (number) correctly: 'json-schema-validator/no-invalid': 'warn' (with quotes).