eslint-plugin-mdx-patch

0.1.3 • Public • Published

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,
    },
  },
],

Supported Rules

/eslint-plugin-mdx-patch/

    Package Sidebar

    Install

    npm i eslint-plugin-mdx-patch

    Weekly Downloads

    0

    Version

    0.1.3

    License

    ISC

    Unpacked Size

    5.73 kB

    Total Files

    14

    Last publish

    Collaborators

    • ianlet