Skip to content

Releases: eslint/markdown

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}"]
            // ...
        }
    ]
};

v1.0.2

24 Feb 16:32
Compare
Choose a tag to compare
  • 52e0984 Upgrade: Update devDeps and change istanbul -> nyc (#130) (Brett Zamir)
  • d52988f Chore: Remove call to lint absent Makefile.js (#129) (Brett Zamir)
  • 5640ea6 Fix: Apply base indent to multiple line breaks (fixes #127) (#128) (Brett Zamir)

v1.0.1

22 Oct 03:49
Compare
Choose a tag to compare
  • fb0b5a3 Fix: Indent multiline fixes (fixes #120) (#124) (Brandon Mills)
  • 07c9017 Chore: Use GitHub Actions (#123) (Brandon Mills)
  • b5bf014 Chore: Add Node 12 to Travis (#122) (Brandon Mills)
  • dc90961 Fix: Support autofix at the very start of blocks (fixes #117) (#119) (Simon Lydell)
  • 2de2490 Docs: Syntax highlight Markdown (#116) (Brett Zamir)
  • fdacf0c Chore: Upgrade to eslint-config-eslint@5.0.1 (#110) (Brandon Mills)

v1.0.0

02 Jan 19:24
Compare
Choose a tag to compare
  • 2a8482e Fix: overrides general docs and Atom linter-eslint tips (fixes #109) (#111) (Brett Zamir)

v1.0.0-rc.1

06 Nov 02:27
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release
  • a2f4492 Fix: Allowing eslint-plugin-prettier to work (fixes #101) (#107) (simlu)

v1.0.0-rc.0

27 Oct 20:11
Compare
Choose a tag to compare
v1.0.0-rc.0 Pre-release
Pre-release
  • 8fe9a0e New: Enable autofix with --fix (fixes #58) (#97) (Bohdan Khodakivskyi)
  • a5d0cce Fix: Ignore anything after space in code fence's language (fixes #98) (#99) (Francisco Ryan Tolmasky I)
  • 6fd340d Upgrade: eslint-release@1.0.0 (#100) (Teddy Katz)
  • dff8e9c Fix: Emit correct endLine numbers (#88) (Paul Murray)
  • 83f00d0 Docs: Suggest disabling strict in .md files (fixes #94) (#95) (Brandon Mills)
  • 3b4ff95 Build: Test against Node v10 (#96) (Brandon Mills)
  • 6777977 Breaking: required node version 6+ (#89) (薛定谔的猫)
  • 5582fce Docs: Updating CLA link (#93) (Pablo Nevares)
  • 24070e6 Build: Upgrade to eslint-release@0.11.1 (#92) (Brandon Mills)
  • 6cfd1f0 Docs: Add unicode-bom to list of unsatisfiable rules (#91) (Brandon Mills)

v1.0.0-beta.8

08 Apr 21:20
Compare
Choose a tag to compare
v1.0.0-beta.8 Pre-release
Pre-release
  • a1544c2 Chore: Add .npmrc to disable creating package-lock.json (#90) (Brandon Mills)
  • 47ad3f9 Chore: Replace global comment integration test with unit test (refs #81) (#85) (Brandon Mills)
  • e34acc6 Fix: Add unicode-bom to unsatisfiable rules (refs #75) (#84) (Brandon Mills)
  • 7c19f8b Fix: Support globals (fixes #79) (#81) (Anders D. Johnson)

v1.0.0-beta.7

02 Jul 20:15
Compare
Choose a tag to compare
v1.0.0-beta.7 Pre-release
Pre-release
  • f8ba18a New: Custom eslint-skip HTML comment skips blocks (fixes #69) (#73) (Brandon Mills)
  • 249904f Chore: Add test for code fences without blank lines (#72) (Brandon Mills)
  • 3abc569 Chore: Un-disable strict and eol-last in repository (#71) (Brandon Mills)
  • 132ea5b Chore: Add test ensuring config comments do not fall through (#70) (Brandon Mills)

v1.0.0-beta.6

30 Apr 01:19
Compare
Choose a tag to compare
v1.0.0-beta.6 Pre-release
Pre-release
  • c5e9d67 Build: Explicitly specify package.json files (#67) (Brandon Mills)

v1.0.0-beta.5

30 Apr 01:17
Compare
Choose a tag to compare
v1.0.0-beta.5 Pre-release
Pre-release

This release was not published to npm due to a bug in the release process.

  • 7bd0f6e Build: Install eslint-release (#66) (Brandon Mills)
  • 48122eb Build: Dogfood plugin without npm link (#65) (Brandon Mills)
  • cc7deea Chore: Increase code coverage (#64) (Brandon Mills)
  • 29f2f05 Build: Use eslint-release (#63) (Brandon Mills)
  • d2f2962 Upgrade: remark (#62) (Titus)