Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Markdown linting and use it on more files #4515

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lornajane
Copy link
Contributor

Fixes #4249 which asks for Markdown linting to be applied to the markdown files at the root level of the repo.

Points to look for:

  • I added a second markdown lint configuration, I expect the standards for the spec and for our everyday markdown files to diverge so while they're not all that different now, I still think it's worth the overhead.
  • We no longer use mdv, it is outdated and we can do most of what's needed with markdownlint. My only concern is that we're missing some formatting of json/yaml/abnf code examples, so we should consider any options on that (and be careful with them in the meantime!)
  • I also removed prettier. We had a script which ran prettier and then did a sed manouvre to fix it. I don't think the benefits of using prettier are worth having this sort of hackery in the project so we'll use the markdownlint "fix" feature instead and I removed the script.

I realise that src/oas.md isn't present on this branch but the same configuration seemed to be okay with what's currently on both v3.1-dev and v3.2-dev.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@lornajane lornajane requested review from a team as code owners March 28, 2025 16:39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. mdv is still listed in dependencies: can we remove it?
  2. markdownlint-cli2 is not declared as a dependency, devDependencies still lists the traditional markdownlint-cli that we used before

@ralfhandl
Copy link
Contributor

The validate-markdown.yaml workflow still calls mdv - should that call be removed?

It also calls markdownlint-cli --config .markdownlint.yaml on the spec files:

  • old cli instead of cli2
  • uses config file that is now intended for non-specs on the spec files

@ralfhandl ralfhandl requested a review from a team March 28, 2025 22:11
@@ -1,14 +1,16 @@
# Technical Oversight Board ("TOB")

## Description:
## Description
>
Copy link
Contributor

@ralfhandl ralfhandl Mar 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>

Empty line after headline instead of block-quoted empty line

Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good direction, let's just remove mdv everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validate-markdown: include markdown files in project root
2 participants