Skip to main content

Language - MDX

Lint MDX content with the eslint-mdx parser and the eslint-plugin-mdx remark plugin so your docs and prose are checked under the same flat config as your source.

Why Use This Preset?

  1. Parses every .mdx file with eslint-mdx so MDX content is linted instead of skipped.
  2. Loads the recommended eslint-plugin-mdx flat ruleset so prose and Markdown issues surface during lint.
  3. Runs the remark processor so Markdown structure is validated as part of the same run.
  4. Scopes itself to **/*.mdx so it never touches your TypeScript or JavaScript files.
  5. Composes as a single language layer so it slots into the documented order without extra wiring.

Usage

Spread langMdx into the default-export array of your eslint.config.ts, in the language layer after code style.

eslint.config.ts
ts
import {
  dxCodeStyle,
  dxIgnore,
  langMdx,
  langTypescript,
} from '@cbnventures/nova/presets/eslint';

export default [
  ...dxIgnore,
  ...dxCodeStyle,
  ...langTypescript,
  ...langMdx,
];

What This Preset Configures

The preset registers the eslint-mdx parser and the eslint-plugin-mdx plugin in a single flat-config entry scoped to **/*.mdx, so MDX files are linted alongside your TypeScript source. It adds no individually authored rules of its own, spreading the plugin's recommended flat ruleset instead.

Registers eslint-mdx as the parser and eslint-plugin-mdx under the mdx namespace, runs the remark processor with lintCodeBlocks: false so fenced code is skipped, and spreads the plugin's recommended flat ruleset for MDX and Markdown.