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

Have Markdown lint runs after commit #738

Open
bact opened this issue Apr 28, 2024 · 1 comment
Open

Have Markdown lint runs after commit #738

bact opened this issue Apr 28, 2024 · 1 comment

Comments

@bact
Copy link
Contributor

bact commented Apr 28, 2024

As suggested in #723 (review)

This lint should be run for both of these repos

One of the possible tools is markdownlint:

Other relatedpre-commit hooks:

- repo: https://github.com/pre-commit/pre-commit-hooks
    hooks:
      - id: end-of-file-fixer
        stages: [commit]
      - id: mixed-line-ending
        stages: [commit]
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]
        stages: [commit]

Note the --markdown-linebreak-ext argument for trailing-whitespace hook. It is to preserved an intentional line break in Markdown -- according to the Markdown syntax: "When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return." We can omit this argument if we are certain that in our spec there will be no such use / discourage such use.

@bact
Copy link
Contributor Author

bact commented Apr 28, 2024

Some newline and whitespace rules can be enforce at the editor and checkout level - see #739

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

No branches or pull requests

1 participant