Skip to content

Commit cdbb085

Browse files
satazormarionebl
authored andcommitted
fix: ignore semver commits with chore type
Closes #198
1 parent d82cbd4 commit cdbb085

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

@commitlint/core/src/library/is-ignored.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const WILDCARDS = [
1212
c
1313
.split('\n')
1414
.shift()
15+
.replace(/^chore(\([^)]+\))?:/, '')
1516
.trim()
1617
)
1718
];

@commitlint/core/src/library/is-ignored.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ test('should ignore npm semver commits', t => {
6868
VERSION_MESSAGES.forEach(message => t.true(isIgnored(message)));
6969
});
7070

71+
test('should ignore npm semver commits with chore', t => {
72+
VERSION_MESSAGES.forEach(message => t.true(isIgnored(`chore: ${message}`)));
73+
VERSION_MESSAGES.forEach(message =>
74+
t.true(isIgnored(`chore(release): ${message}`))
75+
);
76+
});
77+
7178
test('should ignore npm semver commits with footers', t => {
7279
AMENDED_VERSION_MESSAGES.forEach(message => t.true(isIgnored(message)));
7380
});

0 commit comments

Comments
 (0)