Skip to content

Commit dc8d7a2

Browse files
committed
commitlint/plugins: fix the rule
If the subject contains just the word "fix", and there's no commit msg body, this rule should complain.
1 parent fad92e1 commit dc8d7a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

commitlint/plugins.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ export abstract class Plugins {
281281

282282
if (firstWordInTitle === "update") {
283283
offence = titleWords.length > 1 && bodyStr === null;
284+
} else if (firstWordInTitle === "fix") {
285+
offence = bodyStr === null;
284286
} else {
285287
offence = obviousWords.includes(firstWordInTitle);
286288
}

0 commit comments

Comments
 (0)