Docs-website: Add custom markdown linting rules for writers

Created on 11 Dec 2020  路  4Comments  路  Source: newrelic/docs-website

Is your enhancement request related to a problem?

Contributions might not always adhere to the style guide and there are many rules that New Relic adheres to that would be better enforced by using a markdown linter rules that can check a commit prior to creating a PR for review.

Sample linter rules

  • we always use sentence case
  • serial comma enforcement
  • update vs upgrade usage
  • time zone correct format
  • adding 2 blank lines to the end of paragraph (https://github.com/newrelic/docs-website/issues/1692)

Describe the solution you'd like

There are several differ approaches we could take.

Vale is a prose linter which can check markdown and code for issues against a a set of rules. It's relatively easy to set up, has VS Code integration, and can be extended to cover the New Relic style guide.

https://docs.errata.ai/vale/about

Markdownlint is an opensource library we could build a base linter from and we can author custom rules

https://github.com/DavidAnson/markdownlint

Authoring custom rules: https://github.com/DavidAnson/markdownlint/blob/main/doc/CustomRules.md
doc/CustomRules.md

Here is a custom rule someone developed for title case: https://www.npmjs.com/package/markdownlint-rule-titlecase

eng enhancement gatsbysites pg_XD

Most helpful comment

this seems to be getting more popular: https://github.com/errata-ai/vale

All 4 comments

I've modified this issue to focus on the problem vs offering a solution.

Thanks, @jpvajda !

@theletterf thanks for the suggestion! Hope you are well.

this seems to be getting more popular: https://github.com/errata-ai/vale

Was this page helpful?
0 / 5 - 0 ratings