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

Markdown Lint #77

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

Conversation

JakobMiksch
Copy link
Contributor

@JakobMiksch JakobMiksch commented Aug 30, 2024

This PR superseeds #76
It adds another hook to pre-commit that lints the Markdown using markdownlint-cli2.
This enforces a common Markdown style defined in .markdownlint.json

@JakobMiksch JakobMiksch changed the title Pre commit markdown Markdown Lint Aug 30, 2024
@JakobMiksch JakobMiksch marked this pull request as ready for review August 30, 2024 08:56
@pblottiere
Copy link
Owner

Nice thanks @JakobMiksch 👍.

My only concern is about homogeneity. For example in some console code blocks, the leading $ is kept while it has been removed in others. For example:

image

VS

image

Do you have any idea?

@JakobMiksch
Copy link
Contributor Author

JakobMiksch commented Sep 24, 2024

I updated the PR to the latest changes on main.

My only concern is about homogeneity. For example in some console code blocks, the leading $ is kept while it has been removed in others. For example:

The first examples contains some lines that don't start with $, I guess that's why they are not linted.

Here is the rule regarding the $ sign: https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md014.md
It links to this styleguide: https://cirosantilli.com/markdown-style-guide/#dollar-signs-in-shell-code

It essentially recommends that when you use $ you should have the CLI output in the next line(s).

My preference would be to remove $ completely, but I do not have a strong opinion as long it is consistent.

What do you prefer, is removing $ okay for you?

@pblottiere
Copy link
Owner

What do you prefer, is removing $ okay for you?

Yes +1 for following the styleguide https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md014.md 👍

Thanks!

@JakobMiksch
Copy link
Contributor Author

@pblottiere I removed the $ where applicable, but left in a few places where actually makes sense

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.

2 participants