How to make remark-cli exit with non-zero code if it applies any change to the provided files? #1442
-
I'd like to make a pre-commit hook that blocks committing if the markdown files don't fit in with how remark will format them, but I don't want to automatically apply the corrections, I want it to exit with, say, 1 so that the hook makes the commit fail and the user has to intervene manually to fix their mistake (like by manually re-running remark and explicitly making it format the files in-place). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can use the |
Beta Was this translation helpful? Give feedback.
-
Welcome @assyrus-favolo! 👋 |
Beta Was this translation helpful? Give feedback.
You can use the
unified-consistency
plugin.