2

I like the markdownlint extension for Visual Studio Code, but the default settings do not work well for changelog files.

How can I configure markdownlint differently for the CHANGELOG.md file, but use the normal settings for all other markdown files?

In particular, I wish to disable the following for CHANGELOG.md files:

  • MD024/no-duplicate-heading

And, stylistically, I'd like to also disable

  • MD032/blanks-around-lists
  • MD022/blanks-around-headings
Scott Nelson
  • 141
  • 5

2 Answers2

2

I do not see an option to configure markdown lint rules based on file extensions or file names. However, you can add <!-- markdownlint-disable MD024 --> to the top of the CHANGELOG.md file to disable this rule for that particular file.

More details can be found at https://github.com/DavidAnson/vscode-markdownlint#configure

Ryan Taylor
  • 151
  • 7
  • Thanks, Ryan Taylor. I found a more comprehensive way to do what I wanted, so I went ahead and answered my own question. I should have remembered to do that once I figured it out. :-/ – Scott Nelson Jan 29 '21 at 19:42
2

I added this line to the tail of my CHANGELOG.md file, and that worked:

<!-- markdownlint-configure-file { "MD022": false, "MD024": false, "MD030": false, "MD032": false} -->
Scott Nelson
  • 141
  • 5