Skip to content

Commit 579b977

Browse files
authored
fix: use changelogOpts as the base for parserOpts (conventional-changelog#341)
1 parent 4eda933 commit 579b977

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

@commitlint/parse/src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import defaultChangelogOpts from 'conventional-changelog-angular';
44
export default parse;
55

66
async function parse(message, parser = sync, parserOpts) {
7-
if (!parserOpts || Object.keys(parserOpts || {}).length === 0) {
8-
const changelogOpts = await defaultChangelogOpts;
9-
parserOpts = changelogOpts.parserOpts;
10-
}
7+
const changelogOpts = await defaultChangelogOpts;
8+
9+
// Use `changelogOpts` as the base options
10+
parserOpts = Object.assign({}, changelogOpts, parserOpts);
1111

1212
const parsed = parser(message, parserOpts);
1313
parsed.raw = message;

0 commit comments

Comments
 (0)