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

Lint documentation with markdownlint #193

Merged
merged 4 commits into from
May 9, 2023
Merged

Conversation

rileychh
Copy link
Member

@rileychh rileychh commented Apr 10, 2023

Description

Add markdownlint to the project, a widely used markdown linter.

Details are in the commit messages.

How to Verify?

  • Option 1: install markdownlint VSCode extension and run Lint all Markdown files in the workspace with markdownlint using the command palette.
  • Option 2: npm i -g markdownlint-cli2 && markdownlint-cli2 "**/*.md"
  • Option 3: pnpm dlx markdownlint-cli2 "**/*.md"
  • Option 4: yarn dlx markdownlint-cli2 "**/*.md"

Screenshots/GIF/Test Results (Optional)

I tested the new markdownlint workflow locally using act and it passes.

image

- Set line length to 120, the same as our Dart code
- In GitHub templates, set top-level heading to h2
- Add the markdownlint extension to recommendations
- Set extension to only lint versioned files
- Add ruler at column 120 to markdown files
- Disable word wrap for markdown files if view is wide enough to enable
  said ruler
This ensures that future documentation follows linter rules.
- Invoke `markdownlint-cli2-fix`
- Manually fix other violations
- Identical rendering results
@rileychh rileychh added the scope: documentation Improvements or additions to documentation label Apr 10, 2023
@rileychh rileychh self-assigned this Apr 10, 2023
@rileychh rileychh mentioned this pull request Apr 10, 2023
6 tasks
@rileychh rileychh marked this pull request as ready for review April 10, 2023 22:51
Copy link
Member

@Xanonymous-GitHub Xanonymous-GitHub left a comment

Choose a reason for hiding this comment

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

LGTM.

@Xanonymous-GitHub Xanonymous-GitHub merged commit d279fd3 into master May 9, 2023
@Xanonymous-GitHub Xanonymous-GitHub deleted the lint-documentation branch May 9, 2023 19:13
@Xanonymous-GitHub Xanonymous-GitHub added this to the 1.4.4 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants