ESLint plugin and parser for MDX (Markdown with JSX), allowing linting of JavaScript/TypeScript syntax within MDX files. Current stable version is 3.7.0, with active maintenance and support for ESLint 10. It ships TypeScript types, supports both classic and flat ESLint configs, and can lint code blocks in MDX. Key differentiators include integration with remark-lint plugins, support for eslint-plugin-import and eslint-plugin-prettier, and a dedicated VSCode extension. Release cadence is monthly with minor and patch releases following Semantic Versioning.
npm install eslint-plugin-mdxVerified import paths — ran on the pinned version, not inferred.
Shows both flat config (ESM) and classic config (.eslintrc) setups for linting MDX files with ESLint.
Use import syntax instead of require(); update Node.js to >=18
Upgrade ESLint to version 8 or higher
Remove 'mdx/code-blocks' setting and configure code block linting via rules
Use `import plugin from 'eslint-plugin-mdx'; export default [plugin.flat];`
Run `npm install -D eslint-plugin-mdx` or `yarn add -D eslint-plugin-mdx`
Change config to: `import plugin from 'eslint-plugin-mdx'; export default [plugin.flat];`
Ensure 'eslint-mdx' is installed and configured as parser in your ESLint config