This closes #4
Commitlint did not allow overriding the error messages, however it allowed custom rules (with custom errors) which is the approach I chose. I only implemented 4 rules for now.
it's recommended that commitlint runs on the commit-msg git hook, to make sure this happened husky was added to make sure that the hooks are properly configured and automatically after npm install
.
Rules:
docs/no-type
& docs/no-scope
These 2 rules disallows the use of the type and scope which is used in the conventional commit standard. these will create an error if they are found in the commit message
docs/header-length
This rule will warn if the header is longer than 50 characters long
docs/body-blank-line
This rule will warn if there is no blank line between the body and header
Questions
- Are we missing any rules?
- How much info should each warning/error provide? (multiline, colors, bold, italic and more is possible)
- Should we extend the contributing guide to include a section about git commit messages?