Packages
commitlint
commitlint repositoryView Repository
This package is used by the current site.
Setup
yarn add -D @commitlint/cli @commitlint/config-conventional
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [0],
},
}
Automating via Husky
The following commit-msg
hook, ensures that all commit messages follow the
linting rules set up through commitlint
.
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit $1