My commitlint config. Right now it only extends
@commitlint/config-conventional
, but that could change.
Run the following command to install and configure commitlint
npx @eliasnorrby/commitlint-config
This will run a setup script, adding this package to devDependencies
,
intalling husky
, populating the husky.hooks.commit-msg
field in
package.json
, setting the git commit template to .gitmessage
and writing the
config to commitlint.config.js
.
Run setup with the --no-install
flag to avoid installing this package as a
dependency. Your commitling.config.js
will instead extend
@commitlint/config-conventional
.
Install the package
npm i -D @eliasnorrby/commitlint-config
and add the configuration to commitlint.config.js
.
module.exports = require('@eliasnorrby/commitlint-config')
Just add your overrides to commitlint.config.js
:
module.exports = {
...require('@eliasnorrby/commitlint-config'),
rules: {
'header-max-length': [0, 'always', 72],
},
}