diff --git a/@commitlint/is-ignored/src/defaults.ts b/@commitlint/is-ignored/src/defaults.ts index 8f04c18ed4..281c9fbc1e 100644 --- a/@commitlint/is-ignored/src/defaults.ts +++ b/@commitlint/is-ignored/src/defaults.ts @@ -20,7 +20,7 @@ export const wildcards: Matcher[] = [ ), test(/^(Merge tag (.*?))(?:\r?\n)*$/m), test(/^(R|r)evert (.*)/), - test(/^(fixup|squash)!/), + test(/^(amend|fixup|squash)!/), isSemver, test(/^(Merged (.*?)(in|into) (.*)|Merged PR (.*): (.*))/), test(/^Merge remote-tracking branch(\s*)(.*)/), diff --git a/@commitlint/is-ignored/src/is-ignored.test.ts b/@commitlint/is-ignored/src/is-ignored.test.ts index 6f3179cf46..d3b89d7df6 100644 --- a/@commitlint/is-ignored/src/is-ignored.test.ts +++ b/@commitlint/is-ignored/src/is-ignored.test.ts @@ -124,6 +124,10 @@ test('should ignore npm semver commits with footers', () => { ); }); +test('should return true amend commits', () => { + expect(isIgnored('amend! initial commit')).toBe(true); +}); + test('should return true fixup commits', () => { expect(isIgnored('fixup! initial commit')).toBe(true); });