I have a couple of rules in mind for how Iā€™m formatting my šŸ”» Markdown files to keep the formatting consistent throughout my repository. It becomes tiresome to remember them by heart and sometimes you forget about them.

The solution? Markdownlint extension for Visual Studio Code.

2 small configuration changes I have made are:

  • Disabling MD025 (Multiple top-level headings in the same document) because it triggered a warning because I have the metadata in YAML format at the top of the file
  • Enabling MD013 (Line length) because I do want to enforce a maximum line length to keep my files nice and clean to read

I had some trouble figuring out how to change the line_length from the default, so for future reference:

"markdownlint.config": {
    "MD025": false,
    "MD013": {
        "line_length": 100
    }
}

With the introduction of this extension, I can now also remove some of the code in šŸ§‘ā€šŸ’»ļø My Custom VSCode Extension which also gave me a warning if Markdown links were not defined or not used.