@sisense/commitlint-config
v1.9.9
Published
This module contains commitlint configurations for sisense projects
Downloads
266
Keywords
Readme
Commitlint config
Shared commitlint config for sisense projects
The module that checks if your commit messages meet the conventional commit format, follows conventional commits specification for linting your commits.
Install
The module should be installed together with its peer dependencies, that contain only commitlint
itself.
# install via npm
$ npm install --save-dev @commitlint/cli @sisense/commitlint-config
# install via yarn
$ yarn add --dev @commitlint/cli @sisense/commitlint-config
Usage
Configuration
For using this config for you project it is suggested to use next configuration (.commitlintrc.json
):
{
"extends": ["@sisense/commitlint-config"]
}
Setup pre-commit hook
Next code snippets is suggested to install pre-commit hook (requires already installed husky
package):
npx husky add hooks/commit-msg 'npx --no-install commitlint --edit $1'
Setup repository push rules
Next regular expressions are suggested to be set to push rules on repository level:
- Require expression in commit messages:
^((Notes added by \'git notes add\')|((feat|fix|chore|docs|ci|style|refactor|perf|test|revert)(\(.+\))?(!)?\:\s(.{3,})))
- Reject expression in commit messages:
(.{100,}\n?)+