eslint-plugin-mdx-patch
Enforce some rules to patch a couple of issues from the current MDX parser
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
$ yarn add -D eslint
Next, install eslint-plugin-mdx-patch
:
$ npm install eslint-plugin-mdx-patch --save-dev
$ yarn add -D eslint-plugin-mdx-patch
Usage
Add mdx-patch
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
overrides: files: '*.md' plugins: 'mdx-patch' extends: 'plugin:mdx/recommended' rules: 'mdx-patch/block-level-blank-lines': 2
If you use eslint-plugin-prettier
, make sure to use the correct parser:
overrides: files: '*.md' plugins: 'mdx-patch' extends: 'plugin:mdx/recommended' rules: 'prettier/prettier': 'error' parser: 'mdx' 'mdx-patch/block-level-blank-lines': 2