[GH-ISSUE #1455] Accept Micromark config in lint options #686

Closed
opened 2026-03-03 01:29:05 +03:00 by kerem · 1 comment
Owner

Originally created by @farnabaz on GitHub (Dec 20, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1455

Currently, we can extend MarkdownIt using options.markdownItPlugins, but it is not possible to pass extensions to micromark.

It would be great to provide an option to pass Micromark extensions and configs to extend it

Originally created by @farnabaz on GitHub (Dec 20, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1455 Currently, we can extend MarkdownIt using `options.markdownItPlugins`, but it is not possible to pass extensions to micromark. It would be great to provide an option to pass Micromark extensions and configs to extend it <!-- Thank you for taking the time to report an issue! When deciding where to open an issue, please note there are multiple projects under the markdownlint umbrella: - https://github.com/DavidAnson/markdownlint : This is the core JavaScript/Node.js library and is used by other tools. Most issues with implementation and rule behavior belong here. - https://github.com/igorshubovych/markdownlint-cli : This is the original CLI for markdownlint. Issues specific to CLI belong here. - https://github.com/DavidAnson/markdownlint-cli2 : This is a newer CLI for markdownlint and is used by other tools. Issues specific to CLI2 belong here. - https://github.com/DavidAnson/vscode-markdownlint : This is the Visual Studio Code extension for markdownlint. Issues specific to VS Code belong here. - https://github.com/DavidAnson/markdownlint-cli2-action : This is a GitHub Action for markdownlint. Issues specific to the Action belong here. - https://github.com/markdownlint/markdownlint : This is the original markdownlint implementation for Ruby. All Ruby-related issues belong here. Before creating an issue, it's a good practice to search existing issues for something similar. If your issue has already been reported, please update the existing one with any new information. It's also good to review the documentation for any relevant details. When describing an issue, the following information is helpful: - What did you do? - What did you expect to happen? - What actually happened? - What messages or errors were there? - How can the issue be reproduced? - What version were you using? - What operating system were you using? The simplest demonstration of a problem is the most helpful. Small examples can be pasted into the issue description. (Be sure to paste as code so GitHub doesn't render the example in Markdown.) For larger examples, linking to a repository or file is more appropriate. Before proposing a new rule, please review the existing suggestions: https://github.com/DavidAnson/markdownlint/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+rule%22 Thank you! -->
kerem 2026-03-03 01:29:05 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Dec 21, 2024):

I was wondering when this might come up. :)

I’d prefer not to support custom micromark plugins if I don’t have to because that adds complexity and maintenance overhead and is tied to a specific parser. I don’t see significant use of markdownItPlugins across all of GitHub (see query below), and have been taking the approach of incorporating common micromark extensions by default.

What is your scenario? What micromark extension are you looking to add?

--

Here’s a quick GitHub query I did to filters out clones and forks of my code:

https://github.com/search?q=markdownlint+AND+markdownItPlugins+NOT+path%3A.md+NOT+path%3A.d.ts+NOT+path%3A.d.mts+NOT+path%3A.html+NOT+path%3Atest+NOT+path%3Amarkdownlint-browser+NOT+path%3Aconfig-schema+NOT+path%3Amarkdownlint.js+NOT+path%3Amarkdownlint.mjs+NOT+path%3Amarkdownlint-cli2.js+NOT+path%3Amarkdownit.cjs+NOT+path%3Atype-check.ts+NOT+path%3Aextension.js+NOT+markdownlint-rule-sample&type=code&p=1

As far as I can tell, there’s just one repo that MIGHT be using this feature (and I don’t see evidence it actually is):

https://github.com/diplodoc-platform/transform/blob/5bf44fd28a48f00f4cdcfa9fc75d3180bf11d157/src/transform/yfmlint/index.ts

<!-- gh-comment-id:2557928978 --> @DavidAnson commented on GitHub (Dec 21, 2024): I was wondering when this might come up. :) I’d prefer not to support custom `micromark` plugins if I don’t have to because that adds complexity and maintenance overhead and is tied to a specific parser. I don’t see significant use of `markdownItPlugins` across all of GitHub (see query below), and have been taking the approach of incorporating common `micromark` extensions by default. What is your scenario? What `micromark` extension are you looking to add? -- Here’s a quick GitHub query I did to filters out clones and forks of my code: <https://github.com/search?q=markdownlint+AND+markdownItPlugins+NOT+path%3A.md+NOT+path%3A.d.ts+NOT+path%3A.d.mts+NOT+path%3A.html+NOT+path%3Atest+NOT+path%3Amarkdownlint-browser+NOT+path%3Aconfig-schema+NOT+path%3Amarkdownlint.js+NOT+path%3Amarkdownlint.mjs+NOT+path%3Amarkdownlint-cli2.js+NOT+path%3Amarkdownit.cjs+NOT+path%3Atype-check.ts+NOT+path%3Aextension.js+NOT+markdownlint-rule-sample&type=code&p=1> As far as I can tell, there’s just one repo that MIGHT be using this feature (and I don’t see evidence it actually is): <https://github.com/diplodoc-platform/transform/blob/5bf44fd28a48f00f4cdcfa9fc75d3180bf11d157/src/transform/yfmlint/index.ts>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#686
No description provided.