[GH-ISSUE #306] Add ability ignore specific rule with settings.json #262

Closed
opened 2026-03-03 01:25:14 +03:00 by kerem · 8 comments
Owner

Originally created by @marsfan on GitHub (Jul 21, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/306

Not sure if I have missed this in the manual, or in another issue, but it would be really nice if I could specify which issues to ignore specific rules on a global in Visual Studio Code's own settings.json file, so that I do not have to have a separate configuration file just for the extension.

Originally created by @marsfan on GitHub (Jul 21, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/306 Not sure if I have missed this in the manual, or in another issue, but it would be really nice if I could specify which issues to ignore specific rules on a global in Visual Studio Code's own `settings.json` file, so that I do not have to have a separate configuration file just for the extension.
kerem closed this issue 2026-03-03 01:25:14 +03:00
Author
Owner

@nschonni commented on GitHub (Jul 21, 2020):

Think you're looking for this project https://github.com/DavidAnson/vscode-markdownlint

<!-- gh-comment-id:662030292 --> @nschonni commented on GitHub (Jul 21, 2020): Think you're looking for this project https://github.com/DavidAnson/vscode-markdownlint
Author
Owner

@marsfan commented on GitHub (Jul 21, 2020):

Whoops. Clicked the wrong link I guess. Thanks

<!-- gh-comment-id:662031133 --> @marsfan commented on GitHub (Jul 21, 2020): Whoops. Clicked the wrong link I guess. Thanks
Author
Owner

@marsfan commented on GitHub (Jul 21, 2020):

Also, I want to add,for anyone who stumbles across this issue. It is already possible to ignore specific rules with settings.json.

Here is an example of how to disable the rules MD022 and MD032:

    "markdownlint.config": {
        "MD022": false,
        "MD032": false
    }
<!-- gh-comment-id:662033260 --> @marsfan commented on GitHub (Jul 21, 2020): Also, I want to add,for anyone who stumbles across this issue. It is already possible to ignore specific rules with settings.json. Here is an example of how to disable the rules MD022 and MD032: ``` "markdownlint.config": { "MD022": false, "MD032": false } ```
Author
Owner

@dkadrios commented on GitHub (Oct 6, 2020):

Am I crazy, or is it impossible to disable MD029 ?

MD029 deals with the ordering of lists. I have a situation where there is a code block between two list items. Normally that wouldn't produce the desired output, however I use 'sane lists' and it looks great https://python-markdown.github.io/extensions/sane_lists/

  1. item
  2. item
code
  1. item
  2. item

MD029 flags items three and four as warnings and I've not been able to disable it in eslint. I've already disabled MD033 and MD041 (reasons) so I know the setup works, just not for MD029

EDIT:
I was able to get around this by wrapping items three and four with:

This works on a case-by-case basis -- it just doesn't work in globally in .eslintrc

<!-- gh-comment-id:704605660 --> @dkadrios commented on GitHub (Oct 6, 2020): Am I crazy, or is it impossible to disable MD029 ? MD029 deals with the ordering of lists. I have a situation where there is a code block between two list items. Normally that wouldn't produce the desired output, however I use 'sane lists' and it looks great https://python-markdown.github.io/extensions/sane_lists/ 1. item 2. item ``` code ``` 3. item 4. item MD029 flags items three and four as warnings and I've not been able to disable it in eslint. I've already disabled MD033 and MD041 (reasons) so I know the setup works, just not for MD029 EDIT: I was able to get around this by wrapping items three and four with: <!-- markdownlint-disable MD029 --> <!-- markdownlint-enable MD029 --> This works on a case-by-case basis -- it just doesn't work in globally in .eslintrc
Author
Owner

@DavidAnson commented on GitHub (Oct 7, 2020):

MD029 is disable-able per example below.

But I'm not sure how you would do so from an ESLint-specific config file?

https://dlaa.me/markdownlint/#%25m%23%20Disable%20MD029%0A%0A1.%20Item%0A2.%20Item%0A%0AText%0A%0A3.%20Item%0A4.%20Item%0A%0AText%20%3C!--%20markdownlint-disable%20MD029%20--%3E%0A%0A5.%20Item%0A6.%20Item%0A

<!-- gh-comment-id:704616943 --> @DavidAnson commented on GitHub (Oct 7, 2020): MD029 is disable-able per example below. But I'm not sure how you would do so from an ESLint-specific config file? https://dlaa.me/markdownlint/#%25m%23%20Disable%20MD029%0A%0A1.%20Item%0A2.%20Item%0A%0AText%0A%0A3.%20Item%0A4.%20Item%0A%0AText%20%3C!--%20markdownlint-disable%20MD029%20--%3E%0A%0A5.%20Item%0A6.%20Item%0A
Author
Owner

@TRezendes commented on GitHub (Jun 5, 2023):

Thank you @marsfan. This is the only place I could find this method explained simply and clearly.

<!-- gh-comment-id:1577073691 --> @TRezendes commented on GitHub (Jun 5, 2023): Thank you @marsfan. This is the only place I could find this method explained simply and clearly.
Author
Owner

@DavidAnson commented on GitHub (Jun 5, 2023):

Just in case there are more people coming here to look for documentation about the VS Code extension, there is a description and an example of this in the README for that project: https://github.com/DavidAnson/vscode-markdownlint#markdownlintconfig

<!-- gh-comment-id:1577089263 --> @DavidAnson commented on GitHub (Jun 5, 2023): Just in case there are more people coming here to look for documentation about the VS Code extension, there is a description and an example of this in the README for that project: https://github.com/DavidAnson/vscode-markdownlint#markdownlintconfig
Author
Owner

@TRezendes commented on GitHub (Jun 6, 2023):

Perhaps it's just my lack of familiarity with the ins and outs of VSCode, but I read the "Configure" section of the documentation several times and did not understand that there was a method for disabling rules globally. I see it now, but that section still reads to me as though it is merely explaining that some rules are disabled by default, not how or where to disable other rules.

<!-- gh-comment-id:1577795827 --> @TRezendes commented on GitHub (Jun 6, 2023): Perhaps it's just my lack of familiarity with the ins and outs of VSCode, but I read the "Configure" section of the documentation several times and did not understand that there was a method for disabling rules globally. I see it now, but that section still reads to me as though it is merely explaining that some rules are disabled by default, not how or where to disable other rules.
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#262
No description provided.