chore: use markdownlint to lint the docs #26792
Merged
+129
−80
Conversation
63ca878
into
electron:master
8 of 10 checks passed
8 of 10 checks passed
release-notes
Release notes found
No Release Notes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Description of Change
Use
markdownlint
to lint the docs and help keep them tidier going forward.markdownlint
fromDavidAnson/markdownlint
, not to be confused with themarkdownlint/markdownlint
repo.It's actively maintained, highly configurable, has integration with editors like VS Code, and other tooling support like GitHub problem matchers.
I've been making PRs to clean up the markdown, and the configuration in this PR is tailored to run cleanly with the current state of the docs. A couple of the rules off in this config may want to be turned on in the future (for example,
no-duplicate-header
- duplicate headers cause problems for linking since they're multiple places on the page), but I think it's a reasonable compromise for now. Line length is disabled for now; although the style guide says wrap at 80 characters, there's a lot of violations in the docs currently, and I don't want to wrestle with that.PR also drops
script/check-trailing-whitespace.py
sincemarkdownlint
can provide that functionality. I don't love needing the second config file to get the Git hooks functionality, but I didn't want to switch on autofixing more complex rules, and they didn't want to take a PR to specify rules to fix on the CLI, so it was the only way to be a drop-in replacement.The autofix config can be expanded to include rules like blank lines, but for the initial PR I've aimed to be no changes from the current behavior.
Runs clean, but some changes slipped in before I opened this PR, so #26793 needs to be merged first to unblock this.
Checklist
Release Notes
Notes: none