Skip to main content

JSON Schema validation for ESLint flat config

eslint-plugin-json-schema-validator-2

Validate data files, source-file schema exports, Vue custom blocks, and Markdown frontmatter with Ajv-backed JSON Schema checks that fit normal ESLint workflows.

ESLint v9 and v10

Flat config presets for source files, data files, Vue blocks, and Markdown frontmatter.

Schema discovery

Schema discovery supports inline $schema values, YAML language-server comments, and SchemaStore.

Production validation

Standard Ajv formats are enabled by default, with cache controls for catalog lookups.

  • Codecov
  • GitHub open issues
  • GitHub stars
  • latest GitHub release
  • npm license
  • npm total downloads

6 data dialects

JSON Schema validation runs through the same rule for all supported parsers.

Processor based

The frontmatter processor keeps Markdown support outside the no-invalid rule.

Specific diagnostics

Use reportMode to keep full Ajv output or focus on the deepest actionable errors.

Get Started

Install the plugin, enable the flat config, and validate JSON-like data files during normal ESLint runs.

Open section

Schema Sources

Configure schemas explicitly, through $schema fields, with YAML language-server comments, or from SchemaStore.

Open section

Frontmatter

Use the frontmatter preset for Markdown, MDX, and MDC files without adding markdown parsing complexity to the rule.

Open section