I recommend remark-cli with remark-mdx. That’s why I used everywhere, including in this monorepo. I also have my own preset with a bunch of strict style stuff, remark-preset-wooorm
Stack Overflow
stackoverflow.com › questions › 73346224 › formatting-mdx-programmatically-using-prettier
mdxjs - Formatting MDX programmatically using prettier - Stack Overflow
import prettier from "prettier/esm/standalone.mjs"; const markdownParser = require("prettier/parser-markdown"); var formatted = prettier.format(content, { parser: "mdx", plugins: [markdownParser], });
GitHub
github.com › prettier › prettier › issues › 12209
MDX 3 · Issue #12209 · prettier/prettier
February 1, 2022 - The example below is from the blog post. It is a valid MDX in v2, but Prettier 2.5.1 is unable to parse it:
Published Feb 01, 2022
Prettier
prettier.io › docs › plugins
Plugins · Prettier
Plugins are ways of adding new languages or formatting rules to Prettier. Prettier’s own implementations of all languages are expressed using the plugin API. The core prettier package contains JavaScript and other web-focused languages built in.
npm
npmjs.com › package › remark-prettier
remark-prettier - npm
Check and format markdown or MDX using Prettier as a remark plugin. Latest version: 2.0.0, last published: 3 years ago. Start using remark-prettier in your project by running `npm i remark-prettier`. There are 3 other projects in the npm registry using remark-prettier.
» npm install remark-prettier
Published Aug 14, 2022
Version 2.0.0
Author Remco Haszing
Prettier
prettier.io › blog › 2021 › 11 › 25 › 2.5.0.html
Prettier 2.5: TypeScript 4.5 and MDX v2 comment syntax! · Prettier
November 25, 2021 - This release adds support for TypeScript 4.5's new syntax and MDX v2 comment syntax!
npm
npmjs.com › package › prettier-plugin-mdx-no-text-child
prettier-plugin-mdx-no-text-child - npm
And that's it, Prettier will automatically load the plugin based on the package name (prettier-plugin-*). MDX is a markdown extension that allows insertion of JSX inside the Markdown markup.
» npm install prettier-plugin-mdx-no-text-child
Published Apr 12, 2020
Version 0.1.0
Author Nicolas Cuillery
npm
npmjs.com › package › eslint-plugin-mdx
eslint-plugin-mdx - npm
# yarn yarn add -D eslint-plugin-mdx # npm npm i -D eslint-plugin-mdx · If you're using multi languages, js/jsx/ts/tsx/vue, etc for example, you'd better to always use overrides (Classic Config) or files (Flag Config) feature of ESLint, because configs may be overridden by following configs. See #251 for more details. If you're using {/* eslint-disable-line mdx/remark */} with prettier, this won't work because prettier will add a blank line after the comment, which makes it invalid.
» npm install eslint-plugin-mdx
Prettier
prettier.io › docs › options
Options · Prettier
"babel-ts" (similar to "typescript" but uses Babel and its TypeScript plugin) First available in v2.0.0 ... "json-stringify" (same parser as "json", but outputs like JSON.stringify) First available in v1.13.0 · "graphql" (via graphql/language) First available in v1.5.0 · "markdown" (via remark-parse) First available in v1.8.0 · "mdx" (via remark-parse and @mdx-js/mdx) First available in v1.15.0
GitHub
github.com › ncuillery › prettier-plugin-mdx-no-text-child
GitHub - ncuillery/prettier-plugin-mdx-no-text-child: Prettier plugin to enforce that MDX tags are always separated from their child by a blank line
Prettier plugin to enforce that MDX tags are always separated from their child by a blank line - ncuillery/prettier-plugin-mdx-no-text-child
Author ncuillery
Prettier
prettier.io › blog › 2018 › 11 › 07 › 1.15.0
Prettier 1.15: HTML, Vue, Angular and MDX Support · Prettier
November 7, 2018 - MDX is a markdown extension that lets you use JSX to build cool documentation. You can now use Prettier to format it, and we’ll format both the Markdown and JS pieces for you!
GitHub
github.com › mdx-js › eslint-mdx
GitHub - mdx-js/eslint-mdx: ESLint Parser/Plugin for MDX · GitHub
If you're using {/* eslint-disable-line mdx/remark */} with prettier, this won't work because prettier will add a blank line after the comment, which makes it invalid. You can use {/* eslint-disable mdx/remark */} paired with {/* eslint-enable mdx/remark */} instead: {/* eslint-disable mdx/remark */} # Heading {/* eslint-enable mdx/remark */} ... { "extends": ["plugin:mdx/recommended"], // optional, if you want to lint code blocks at the same time "settings": { "mdx/code-blocks": true, // optional, if you want to disable language mapper, set it to `false` // if you want to override the default
Author mdx-js
npm
npmjs.com › package › prettier-plugin-embed
prettier-plugin-embed - npm
Type: "markdown" | "mdx" | "remark" Default: "markdown" Description: The parser used to parse the embedded Markdown language. Formatting embedded Markdown language doesn't require other plugins and uses the parsers and printers provided by Prettier ...
» npm install prettier-plugin-embed
Published Dec 19, 2025
Version 0.5.1
Author Ze-Zheng Wu
GitHub
github.com › orgs › mdx-js › discussions › 2051
Formatting MDX 2 files · mdx-js · Discussion #2051
I’m using remark with remark-mdx and a bunch of other plugins. There’s also eslint-mdx that can help. ... "format": "remark . -qfo && remark . -e mdx -u mdx -qfo && prettier .
npm
npmjs.com › package › prettier-plugin-md-nocjsp
prettier-plugin-md-nocjsp - npm
このオプションを利用するには、.prettierrcを以下のように編集(quickFix: trueを加える)して、1回だけ再フォーマットします。 · # *snip* overrides: - files: - "*.md" - README options: parser: markdown-nocjsp quickFix: true - files: - "*.mdx" options: parser: mdx-nocjsp quickFix: true
» npm install prettier-plugin-md-nocjsp
Published Jan 17, 2023
Version 1.5.1
Author Tatsunori Uchino
Npm
npm.io › package › prettier-plugin-mdx-no-text-child
Prettier-plugin-mdx-no-text-child NPM | npm.io
And that's it, Prettier will automatically load the plugin based on the package name (prettier-plugin-*). MDX is a markdown extension that allows insertion of JSX inside the Markdown markup.