How to have different markdownlint rules for CHANGELOG.md files

Viewed 362

In VS Code, I use markdownlint for my markdown files. I like the rules that it imposes except for my CHANGELOG.md file (see keepachangelog.com).

Is there a way to have one set of rules for most of my markdown files and another set for the change log?

1 Answers

You can use custom markdownlint configuration for a file by using the following syntax:

<!-- markdownlint-configure-file { options.config JSON } -->

For example, to set line length of the CHANGELOG.md file to 90, add the following to it:

<!-- markdownlint-configure-file { "MD013": { "line_length": 90 } } -->

For more details, see the markdownlint's Configuration documentation.

Related