@forsakringskassan/commitlint-config
v1.3.5
Published
FK commitlint shareable config
Downloads
9,098
Readme
@forsakringskassan/commitlint-config
Based on Conventional Commits with additional checks for JIRA.
[optional scope]: ()
[optional body]
[optional footer(s)]
fix:
fixes a bug and results in aPATCH
release.feat:
introduces a new feature and results in aMINOR
release.BREAKING CHANGE:
in the footer followed by a description results in aMAJOR
release. The description is added to the changelog.types
other thanfix
andfeat
is allowed, see list at @commitlint/config-conventional(fixes XYZ-123)
or(refs XYZ-123)
JIRA reference must be included after subject.
Install
$ npm install --save-dev @forsakringskassan/commitlint-config
This package bundles @commitlint/cli
so it does not have to be installed separately.
Configuration
This package provides two variants:
@forsakringskassan/commitlint-config/default
@forsakringskassan/commitlint-config/no-jira
The default configuration enforces a JIRA reference at the end of the header.
The no-jira
variant does not enforce it.
npm pkg set commitlint.extends=@forsakringskassan/commitlint-config/default
or manually edit package.json
:
{
"commitlint": {
"extends": "@forsakringskassan/commitlint-config/default"
}
}
Usage
As a husky hook:
echo 'npm exec commitlint -- --edit "$1"' > .husky/commit-msg