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?
- Parses every
.mdxfile witheslint-mdxso MDX content is linted instead of skipped. - Loads the recommended
eslint-plugin-mdxflat ruleset so prose and Markdown issues surface during lint. - Runs the remark processor so Markdown structure is validated as part of the same run.
- Scopes itself to
**/*.mdxso it never touches your TypeScript or JavaScript files. - 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.
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.
MDX parser and recommended rules
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.
Related
- Review the layering order in ESLint Best Practices.
- See how presets compose end to end in the Presets Overview.