semantic-release plugin for analyzing commit messages by commitlint
Step | Description |
---|---|
analyzeCommits |
Analyzing commit messages by commitlint. |
npm install semantic-release-commits-lint -D
The plugin can be configured in the semantic-release configuration file:
{
"plugins": [
"semantic-release-commits-lint"
]
}
Options | Description | Default |
---|---|---|
commitlintFile |
File path of the commitlint config. | - |
commitlintConfig |
Commitlint config as object. | - |
Notes: For the plugin to work correctly, you need to configure commitlint config
- Install
@commitlint/config-conventional
if need.
npm install @commitlint/config-conventional -D
- Add commitlint config file in project
.commitlintrc.json
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-case": [2, "always", ["pascal-case"]]
}
}
- Configuration
semantic-release
.releaserc
{
"plugins": [
"semantic-release-commits-lint"
]
}
- Install
@commitlint/config-conventional
if need.
npm install @commitlint/config-conventional -D
- Add commitlint config file in project
.commitlintrc-for-semantic-release.json
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-case": [2, "always", ["pascal-case"]]
}
}
- Configuration
semantic-release
.releaserc
{
"plugins": [
[
"semantic-release-commits-lint",
{
"commitlintFile": ".commitlintrc-for-semantic-release.json"
}
]
]
}
- Install
@commitlint/config-conventional
if need.
npm install @commitlint/config-conventional -D
- Configuration
semantic-release
.releaserc
{
"plugins": [
[
"semantic-release-commits-lint",
{
"commitlintConfig": {
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-case": [2, "always", ["pascal-case"]]
}
}
}
]
]
}