Skip to content

Releases: eslint/markdown

v3.0.0

16 Jul 20:34
Compare
Choose a tag to compare

Breaking Changes

  • 071fa66 feat!: drop node v8 and v10 (#203) (Amaresh S M)

Documentation

  • 87c2b53 docs: update badges (#202) (Milos Djermanovic)

Chores

  • 558ae3c chore: add node v18 (#205) (Amaresh S M)
  • f186730 ci: update github actions (#207) (Deepshika S)
  • 6570c82 ci: Work around npm behavior changes to fix CI on main (#206) (Brandon Mills)
  • 2fd5b89 chore: add tests for ESLint 8 (#195) (Michaël De Boey)
  • 8db0978 chore: Check for package.json in examples (#200) (Brandon Mills)
  • b695396 test: test with ESLint instead of CLIEngine when available (#198) (Michaël De Boey)
  • e1ddcc5 ci: use node v16 (#199) (Nitin Kumar)
  • 8f590fc chore: update devDependencies (#197) (Michaël De Boey)
  • 3667566 chore: test all supported ESLint versions (#196) (Michaël De Boey)
  • ecae4fe Chore: ignore pnpm-lock.yaml (#193) (Nitin Kumar)
  • ffdb245 Chore: use actions/setup-node@v2 in CI (#192) (Nitin Kumar)

v2.2.1

12 Sep 01:13
Compare
Choose a tag to compare
  • 3a40160 Fix: message.line could be undefined (#191) (JounQin)

v2.2.0

26 May 04:17
Compare
Choose a tag to compare

v2.1.0

25 Apr 21:13
Compare
Choose a tag to compare
  • f1e153b Update: Upgrade remark-parse to v7 (fixes #77, fixes #78) (#175) (Brandon Mills)

v2.0.1

05 Apr 04:37
Compare
Choose a tag to compare
  • d23d5f7 Fix: use blocksCache instead of single blocks instance (fixes #181) (#183) (JounQin)
  • a09a645 Chore: add yarn.lock and package-lock.json into .gitignore (#184) (JounQin)
  • 1280ac1 Docs: improve jsdoc, better for typings (#182) (JounQin)
  • 79be776 Fix: More reliable comment attachment (fixes #76) (#177) (Brandon Mills)

v2.0.0

14 Feb 23:10
Compare
Choose a tag to compare
  • 53dc0e5 Docs: Remove prerelease README notes (#173) (Brandon Mills)
  • 140adf4 2.0.0-rc.2 (ESLint Jenkins)
  • 15d7aa6 Build: changelog update for 2.0.0-rc.2 (ESLint Jenkins)
  • f6a3fad Fix: overrides pattern for virtual filenames in recommended config (#169) (Milos Djermanovic)
  • 390d508 2.0.0-rc.1 (ESLint Jenkins)
  • e05d6eb Build: changelog update for 2.0.0-rc.1 (ESLint Jenkins)
  • 1dd7089 Fix: npm prepare script on Windows (refs #166) (#168) (Brandon Mills)
  • 23ac2b9 Fix: Ignore words in info string after syntax (fixes #166) (#167) (Brandon Mills)
  • 8f729d3 Chore: Switch to main for primary branch (fixes #161) (#165) (Brandon Mills)
  • d30c50f Chore: Automatically install example dependencies (#164) (Brandon Mills)
  • 2749b4d 2.0.0-rc.0 (ESLint Jenkins)
  • 922a00e Build: changelog update for 2.0.0-rc.0 (ESLint Jenkins)
  • d94c22f Build: Install example test dependencies in Jenkins (#160) (Brandon Mills)
  • 7f26cb9 Docs: Reference recommended config disabled rules (#159) (Brandon Mills)
  • bf7648f Docs: Add TypeScript example (#155) (Brandon Mills)
  • d80be9e New: Add rules to recommended config (#157) (Nikolay Stoynov)
  • fc4d7aa Chore: run CI in Node 14.x (#158) (Kai Cataldo)
  • f2d4923 Docs: Add React example (#152) (Brandon Mills)
  • eb66833 New: Add recommended config (fixes #151) (#153) (Brandon Mills)
  • 0311640 Fix: Don't require message end locations (fixes #112) (#154) (Brandon Mills)
  • 2bc9352 2.0.0-alpha.0 (ESLint Jenkins)
  • c0ba401 Build: changelog update for 2.0.0-alpha.0 (ESLint Jenkins)
  • 51e48c6 Docs: Revamp documentation for v2 (#149) (Brandon Mills)
  • b221391 Docs: Dogfood plugin by linting readme (#145) (Brandon Mills)
  • 7423610 Docs: Explain use of --ext option in ESLint v7 (#146) (Brandon Mills)
  • 0d4dbe8 Breaking: Implement new processor API (fixes #138) (#144) (Brandon Mills)
  • 7eeafb8 Chore: Update ESLint config and plugins (#143) (Brandon Mills)
  • f483343 Breaking: Require ESLint v6 (#142) (Brandon Mills)
  • 9aa1fdc Chore: Use ES2018 object spread syntax (#141) (Brandon Mills)
  • f584cc6 Build: Remove Travis (#140) (Brandon Mills)
  • 35f9a11 Breaking: Drop support for Node.js v6 (refs #138) (#137) (Brandon Mills)
  • 6f02ef5 Chore: Add npm version and build status badges (#139) (Brandon Mills)

Migrating from eslint-plugin-markdown v1

  1. Install this release:

    $ npm install --save-dev eslint@latest eslint-plugin-markdown@latest
  2. In your .eslintrc.js file, extend the recommended config:

     // .eslintrc.js
     module.exports = {
    -    plugins: ["markdown"],
    -    overrides: [
    -        {
    -            files: ["**/*.md"],
    -            parserOptions: {
    -                ecmaFeatures: {
    -                    impliedStrict: true
    -                }
    -            },
    -        }
    -    ]
    +    extends: "plugin:markdown/recommended"
     };

The readme's detailed migration instructions discuss all of the differences between v1 and v2.

v2.0.0-rc.2

31 Jan 04:09
Compare
Choose a tag to compare
v2.0.0-rc.2 Pre-release
Pre-release
  • f6a3fad Fix: overrides pattern for virtual filenames in recommended config (#169) (Milos Djermanovic)

Migrating from eslint-plugin-markdown v1

  1. Install this release candidate:

    $ npm install --save-dev eslint@latest eslint-plugin-markdown@next
  2. In your .eslintrc.js file, extend the recommended config:

     // .eslintrc.js
     module.exports = {
    -    plugins: ["markdown"],
    -    overrides: [
    -        {
    -            files: ["**/*.md"],
    -            parserOptions: {
    -                ecmaFeatures: {
    -                    impliedStrict: true
    -                }
    -            },
    -        }
    -    ]
    +    extends: "plugin:markdown/recommended"
     };

The readme's detailed migration instructions discuss all of the differences between v1 and v2.

v2.0.0-rc.1

20 Dec 20:47
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release
  • 1dd7089 Fix: npm prepare script on Windows (refs #166) (#168) (Brandon Mills)
  • 23ac2b9 Fix: Ignore words in info string after syntax (fixes #166) (#167) (Brandon Mills)
  • 8f729d3 Chore: Switch to main for primary branch (fixes #161) (#165) (Brandon Mills)
  • d30c50f Chore: Automatically install example dependencies (#164) (Brandon Mills)

Migrating from eslint-plugin-markdown v1

  1. Install this release candidate:

    $ npm install --save-dev eslint@latest eslint-plugin-markdown@next
  2. In your .eslintrc.js file, extend the recommended config:

     // .eslintrc.js
     module.exports = {
    -    plugins: ["markdown"],
    -    overrides: [
    -        {
    -            files: ["**/*.md"],
    -            parserOptions: {
    -                ecmaFeatures: {
    -                    impliedStrict: true
    -                }
    -            },
    -        }
    -    ]
    +    extends: "plugin:markdown/recommended"
     };

The readme's detailed migration instructions discuss all of the differences between v1 and v2.

v2.0.0-rc.0

20 Aug 03:58
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release
  • d94c22f Build: Install example test dependencies in Jenkins (#160) (Brandon Mills)
  • 7f26cb9 Docs: Reference recommended config disabled rules (#159) (Brandon Mills)
  • bf7648f Docs: Add TypeScript example (#155) (Brandon Mills)
  • d80be9e New: Add rules to recommended config (#157) (Nikolay Stoynov)
  • fc4d7aa Chore: run CI in Node 14.x (#158) (Kai Cataldo)
  • f2d4923 Docs: Add React example (#152) (Brandon Mills)
  • eb66833 New: Add recommended config (fixes #151) (#153) (Brandon Mills)
  • 0311640 Fix: Don't require message end locations (fixes #112) (#154) (Brandon Mills)

Migrating from eslint-plugin-markdown v1

  1. Install this release candidate:

    $ npm install --save-dev eslint@latest eslint-plugin-markdown@next
  2. In your .eslintrc.js file, extend the recommended config:

     // .eslintrc.js
     module.exports = {
    -    plugins: ["markdown"],
    -    overrides: [
    -        {
    -            files: ["**/*.md"],
    -            parserOptions: {
    -                ecmaFeatures: {
    -                    impliedStrict: true
    -                }
    -            },
    -        }
    -    ]
    +    extends: "plugin:markdown/recommended"
     };

The readme's detailed migration instructions discuss all of the differences between v1 and v2.

v2.0.0-alpha.0

12 Apr 20:25
Compare
Choose a tag to compare
v2.0.0-alpha.0 Pre-release
Pre-release
  • 51e48c6 Docs: Revamp documentation for v2 (#149) (Brandon Mills)
  • b221391 Docs: Dogfood plugin by linting readme (#145) (Brandon Mills)
  • 7423610 Docs: Explain use of --ext option in ESLint v7 (#146) (Brandon Mills)
  • 0d4dbe8 Breaking: Implement new processor API (fixes #138) (#144) (Brandon Mills)
  • 7eeafb8 Chore: Update ESLint config and plugins (#143) (Brandon Mills)
  • f483343 Breaking: Require ESLint v6 (#142) (Brandon Mills)
  • 9aa1fdc Chore: Use ES2018 object spread syntax (#141) (Brandon Mills)
  • f584cc6 Build: Remove Travis (#140) (Brandon Mills)
  • 35f9a11 Breaking: Drop support for Node.js v6 (refs #138) (#137) (Brandon Mills)
  • 6f02ef5 Chore: Add npm version and build status badges (#139) (Brandon Mills)

Migrating from eslint-plugin-markdown v1

eslint-plugin-markdown v1 used an older version of ESLint's processor API.
The Markdown processor automatically ran on .md, .mkdn, .mdown, and .markdown files, and it only extracted fenced code blocks marked with js, javascript, jsx, or node syntax.
Configuration specifically for fenced code blocks went inside an overrides entry with a files pattern matching the containing Markdown document's filename that applied to all fenced code blocks inside the file.

// .eslintrc.js for eslint-plugin-markdown v1
module.exports = {
    plugins: ["markdown"],
    overrides: [
        {
            files: ["**/*.md"],
            // In v1, configuration for fenced code blocks went inside an
            // `overrides` entry with a .md pattern, for example:
            parserOptions: {
                ecmaFeatures: {
                    impliedStrict: true
                }
            },
            rules: {
                "no-console": "off"
            }
        }
    ]
};

RFC3 designed a new processor API to remove these limitations, and the new API was implemented as part of ESLint v6.
eslint-plugin-markdown v2 uses this new API.

$ npm install --save-dev eslint@latest eslint-plugin-markdown@next

All of the Markdown file extensions that were previously hard-coded are now fully configurable in .eslintrc.js.
Use the new processor option to apply the markdown/markdown processor on any Markdown documents matching a files pattern.
Each fenced code block inside a Markdown document has a virtual filename appended to the Markdown file's path.
The virtual filename's extension will match the fenced code block's syntax tag, so for example, ```js code blocks in README.md would match README.md/*.js.

// eslintrc.js for eslint-plugin-markdown v2
module.exports = {
    plugins: ["markdown"],
    overrides: [
        {
            // In v2, explicitly apply eslint-plugin-markdown's `markdown`
            // processor on any Markdown files you want to lint.
            files: ["**/*.md"],
            processor: "markdown/markdown"
        },
        {
            // In v2, configuration for fenced code blocks is separate from the
            // containing Markdown file. Each code block has a virtual filename
            // appended to the Markdown file's path.
            files: ["**/*.md/*.js"],
            // Configuration for fenced code blocks goes with the override for
            // the code block's virtual filename, for example:
            parserOptions: {
                ecmaFeatures: {
                    impliedStrict: true
                }
            },
            rules: {
                "no-console": "off"
            }
        }
    ]
};

If you need to precisely mimic the behavior of v1 with the hard-coded Markdown extensions and fenced code block syntaxes, you can use those as glob patterns in overrides[].files:

// eslintrc.js for v2 mimicking v1 behavior
module.exports = {
    plugins: ["markdown"],
    overrides: [
        {
            files: ["**/*.{md,mkdn,mdown,markdown}"],
            processor: "markdown/markdown"
        },
        {
            files: ["**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}"]
            // ...
        }
    ]
};