octopusthink / nautilus

Inclusive, open-source design system and React component library.
https://nautilus.octopusthink.com
MIT License
2 stars 0 forks source link

feat: Add markdown linter rules & lint READMEs. #223

Closed sarahmonster closed 4 years ago

sarahmonster commented 4 years ago

I've taken to using this Markdown linter in VSCode: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint

If nothing else, it prevents me from leaving double-empty-lines, which I know @tofumatt hates! Linters to the rescue.

Generally, I've found the linting to be helpful—it's helped me catch non-sequential headings or duplicated headings, for instance—some of the rules don't make sense for us (for instance, Styleguidist adds its own H1 title to each page, so our Markdown files don't need to...)

So, I've added some rules to customise the behaviour in a way that makes sense for us, and I've used it to lint all the existing README files as well.

@tofumatt want to give it a try and let me know if you think it's useful? No hurries, but I was doing this as part of #215 and someone told me it should be a separate PR.

More details on the Github repo here: https://github.com/DavidAnson/markdownlint