[GH-ISSUE #264] Support rule configuration changes via inline comment syntax #228

Closed
opened 2026-03-03 01:24:53 +03:00 by kerem · 4 comments
Owner

Originally created by @koppor on GitHub (Mar 3, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/264

MD033 allows for adding paramters:

grafik

It is unclear how this works with markdown-lint-disable-file

I tried

<!-- markdownlint-disable-file MD024 MD033(['kbd']) -->
<!-- markdownlint-disable-file MD024 MD033(kbd) -->

Both do not result in <kbd>Enter</kbd> is ignored.

Originally created by @koppor on GitHub (Mar 3, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/264 MD033 allows for adding paramters: ![grafik](https://user-images.githubusercontent.com/1366654/75816898-53c33100-5d96-11ea-8592-899e1df92c44.png) It is unclear how this works with `markdown-lint-disable-file` I tried ```html <!-- markdownlint-disable-file MD024 MD033(['kbd']) --> <!-- markdownlint-disable-file MD024 MD033(kbd) --> ``` Both do not result in `<kbd>Enter</kbd>` is ignored.
kerem 2026-03-03 01:24:53 +03:00
Author
Owner

@DavidAnson commented on GitHub (Mar 3, 2020):

The comment syntax above allows one to enable or disable rules by name, but does not allow configuring those rules. If you want to disable MD033, just identify it by that name.

FYI that I have already sketched out a design that would allow inline comments to configure rules. I expect to work on that in the next few weeks.

<!-- gh-comment-id:594157047 --> @DavidAnson commented on GitHub (Mar 3, 2020): The comment syntax above allows one to enable or disable rules by name, but does not allow configuring those rules. If you want to disable MD033, just identify it by that name. FYI that I have already sketched out a design that would allow inline comments to configure rules. I expect to work on that in the next few weeks.
Author
Owner

@DavidAnson commented on GitHub (Mar 3, 2020):

By the way, “disabling” a rule turns it off. Retreading your issue, it seems you want to “enable” MD033 (and configure it).

<!-- gh-comment-id:594157993 --> @DavidAnson commented on GitHub (Mar 3, 2020): By the way, “disabling” a rule turns it off. Retreading your issue, it seems you want to “enable” MD033 (and configure it).
Author
Owner

@koppor commented on GitHub (Mar 4, 2020):

Oh, yes, you are right. I wanted to "disable MD033 for all elements besides kbd" to allow Enter in CHANGELOG.md files. Reason: It renders nice:

image

Maybe, I ask for

<!-- markdownlint-configure-file MD033(['kbd']) -->

or (simpler syntax as html element names do not contain spaces:

<!-- markdownlint-configure-file MD033(kbd) -->

Then one can also do easily

<!-- markdownlint-configure-file MD033(kbd, table, th, td) -->
<!-- gh-comment-id:594340276 --> @koppor commented on GitHub (Mar 4, 2020): Oh, yes, you are right. I wanted to "disable MD033 for all elements besides kbd" to allow <kbd>Enter</kbd> in [CHANGELOG.md files](https://keepachangelog.com/en/1.0.0/). Reason: It renders nice: ![image](https://user-images.githubusercontent.com/1366654/75849040-2dc47d80-5de4-11ea-86dc-8a4fa9cd2a30.png) Maybe, I ask for <!-- markdownlint-configure-file MD033(['kbd']) --> or (simpler syntax as html element names do not contain spaces: <!-- markdownlint-configure-file MD033(kbd) --> Then one can also do easily <!-- markdownlint-configure-file MD033(kbd, table, th, td) -->
Author
Owner

@DavidAnson commented on GitHub (Mar 5, 2020):

You correctly guessed the planned name of the new directive! :) However, I expect to use JSON for the data so that it is consistent with the most common configuration file format. JSON is also validate-able by the user and offers auto-completion in the VS Code extension. But your scenario/proposal maps pretty well to what I had in mind.

<!-- gh-comment-id:595011064 --> @DavidAnson commented on GitHub (Mar 5, 2020): You correctly guessed the planned name of the new directive! :) However, I expect to use JSON for the data so that it is consistent with the most common configuration file format. JSON is also validate-able by the user and offers auto-completion in the VS Code extension. But your scenario/proposal maps pretty well to what I had in mind.
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#228
No description provided.