compliantkubernetes icon indicating copy to clipboard operation
compliantkubernetes copied to clipboard

Markdownlint and Prettier

Open aarnq opened this issue 11 months ago • 2 comments

⚠️ IMPORTANT ⚠️: This is a public repository. Make sure to not disclose:

  • [x] personal data beyond what is necessary for interacting with this Pull Request;
  • [x] business confidential information, such as customer names.

Quality gates:

  • [x] I'm aware of the Contributor Guide and did my best to follow the guidelines.
  • [x] I'm aware of the Glossary and did my best to use those terms.

This adds markdownlint and prettier to pre-commit to enforce a more unified style, although it have some caveats since we use a patchwork of extensions on a not so well defined flavour of markdown. Though most work as intentional right now, I will add some more notes so it is easier to follow up what's required, and what plugins to use in vscode to support it (since I know a lot of people use it).

This should be followed up with some work to standardise across pages.

aarnq avatar Mar 26 '24 14:03 aarnq

Question to reviewers

Currently the rule for ordered lists have the markdown as increasing:

1.
2.
3.

Though this presents problem when we reach two digits, since then markdownlint and prettier wants to do different things.

Prettier wants to align with the content of the item, which means it is happy with unaligned indentation, and you have to force it to align it. Markdownlint however only supports static item indent, so it is currently used to check that we have aligned it for the case of single digit numbers.

Do we want to start having only one for ordered lists?

1.
1.
1.

As this will render correctly in most cases, and function in this setup except for a special case with one plugin.

aarnq avatar Mar 26 '24 15:03 aarnq

lgtm, I think forcing only 1. is a good idea

I second having only 1. as a standard would be good, I also see that a bunch of the documents fixed in this pr would not follow that standard. So should I wait to review this pr anymore till those documents are fixed to this standard?

linus-astrom avatar Mar 27 '24 10:03 linus-astrom