[GH-ISSUE #374] Add a .pre-commit hook #2161

Closed
opened 2026-03-07 20:05:09 +03:00 by kerem · 7 comments
Owner

Originally created by @JensHeinrich on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/374

The ruby implementation already supplies a pre-commit hook and it would be useful to have one for the npm version too

Originally created by @JensHeinrich on GitHub (Mar 3, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/374 The ruby implementation already supplies a [pre-commit](https://pre-commit.com/) hook and it would be useful to have one for the npm version too
kerem 2026-03-07 20:05:09 +03:00
Author
Owner
<!-- gh-comment-id:789494684 --> @DavidAnson commented on GitHub (Mar 3, 2021): Both CLI’s have this already: - https://github.com/igorshubovych/markdownlint-cli/blob/master/.pre-commit-hooks.yaml - https://github.com/DavidAnson/markdownlint-cli2/blob/main/.pre-commit-hooks.yaml
Author
Owner

@JensHeinrich commented on GitHub (Mar 3, 2021):

Thank you very much.

I did not see it.

Can I add a reference to the CLI section to the example usage section?

<!-- gh-comment-id:789515847 --> @JensHeinrich commented on GitHub (Mar 3, 2021): Thank you very much. I did not see it. Can I add a reference to the CLI section to the example usage section?
Author
Owner

@janosh commented on GitHub (Oct 6, 2021):

I second @JensHeinrich's suggestion to specifically mention pre-commit in the readme. ac8545e did not help me find this.

<!-- gh-comment-id:935621430 --> @janosh commented on GitHub (Oct 6, 2021): I second @JensHeinrich's suggestion to specifically mention pre-commit in the readme. ac8545e did not help me find this.
Author
Owner

@DavidAnson commented on GitHub (Oct 6, 2021):

This library does not work with pre-commit; the CLIs do (and both document support in their README). I'm not sure I want to re-document everything downstream projects support.

<!-- gh-comment-id:936509820 --> @DavidAnson commented on GitHub (Oct 6, 2021): This library does not work with pre-commit; the CLIs do (and both document support in their README). I'm not sure I want to re-document everything downstream projects support.
Author
Owner

@janosh commented on GitHub (Oct 6, 2021):

Fair enough. I noticed you have a file on Prettier in the docs. Perhaps a file for pre-commit could be added as well?

<!-- gh-comment-id:936737802 --> @janosh commented on GitHub (Oct 6, 2021): Fair enough. I noticed you have a file on Prettier in the docs. Perhaps a file for pre-commit could be added as well?
Author
Owner

@DavidAnson commented on GitHub (Oct 6, 2021):

Good idea, I've added a TODO!

<!-- gh-comment-id:936946586 --> @DavidAnson commented on GitHub (Oct 6, 2021): Good idea, I've added a TODO!
Author
Owner

@janosh commented on GitHub (Oct 6, 2021):

I've taken the liberty myself: #440.

<!-- gh-comment-id:937050794 --> @janosh commented on GitHub (Oct 6, 2021): I've taken the liberty myself: #440.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2161
No description provided.