Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>VSCode MDXNew to Visual Studio Code? Get it now.

VSCode MDX

JounQin

|
17,580 installs
| (1) | Free
Visual Studio Code extension for MDX
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Studio Code extension for MDX

Adds language support for MDX.

Installation

You can install this extension from the Marketplace.

Integration With VS Code ESLint

  1. First of all, you need to enable eslint-plugin-mdx which makes it possible to lint .mdx or .md files with ESLint.

  2. And then you will need to enable ESLint validation for .mdx and .md files like following:

// .vscode/settings.json
{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.options": {
    "extensions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx"]
  },
  "eslint.validate": [
    "markdown",
    "mdx",
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}

Markdown Syntax

Markdown Syntax could also be linted via eslint-plugin-mdx and remark-lint plugins.

it will read remark's configuration automatically via cosmiconfig. But .remarkignore will not be respected, you should use .eslintignore instead.

More usage detail please refer to eslint-plugin-mdx's documentation.

Auto-close tags

If you want VS Code to automatically close tags while you type, you can install Auto Close Tag and configure it to also include the language mdx:

"auto-close-tag.activationOnLanguage": [
  "xml",
  "php",
  "...",
  "mdx"
]
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2022 Microsoft