mdx-analyzer
mdx-analyzer copied to clipboard
MDX extension for Visual Studio Code
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
-
First of all, you need to enable eslint-plugin-mdx which makes it possible to lint
.mdxor.mdfiles withESLint. -
And then you will need to enable ESLint validation for
.mdxand.mdfiles 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
.remarkignorewill not be respected, you should use.eslintignoreinstead.
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"
]
Known vscode-eslint issues
Fatal javascript OOM in GC during deserialization
ESlint is using VS Code's old, built-in version of NodeJS (v12) as provided by Electron. Please add the following setting to use system default Node runtime instead:
{
"eslint.runtime": "node"
}
Please visit https://github.com/microsoft/vscode-eslint/issues/1498#issuecomment-1175813839 as reference for details.
JavaScript heap out of memory
The default memory limit of Node.js is 1G, please add the following setting to increase the limit:
{
"eslint.execArgv": ["--max_old_space_size=8192"]
}
Please visit https://github.com/microsoft/vscode-eslint/issues/733 as reference for details.
Sponsors
| 1stG | RxTS | UnTS |
|---|---|---|
Backers
| 1stG | RxTS | UnTS |
|---|---|---|
Changelog
Detailed changes for each release are documented in CHANGELOG.md.