conventional-changelog/commitlint
`parserPreset` in `.commitlintc.json` is ignored
已关闭
#4,091 创建于 2024年6月19日
bughelp wanted
仓库指标
- 星标
- (15,497 个星标)
- PR 合并指标
- (平均合并 12小时 56分钟) (30 天内合并 52 个 PR)
描述
Steps to Reproduce
- Create
.commitlintrc.jsonwith the following contents
{
"extends": ["@commitlint/config-conventional"],
"parserPreset:": {
"parserOpts": {
"issuePrefixes": ["PREFIX-"]
}
},
"rules": {
"references-empty": [2, "never"]
}
}
- Run
echo "feat: some feature (PREFIX-123)" | npx commitlintand observe how an error for empty references is thrown. - Run
npx commitlint --print-configand observe howparserPreset.parserOpts.issuePrefixesis[ '#' ].
With a commitlint.config.js this does not happen.
Current Behavior
see above.
Expected Behavior
It should correctly pick up parserPreset from the JSON configuration.
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
No response
Context
No response
commitlint --version
@commitlint/cli@19.3.0
git --version
2.45.2
node --version
v20.13.1