From 1f6e272d899fb0f42520a85dbc27a259723f3b55 Mon Sep 17 00:00:00 2001 From: Mersho Date: Tue, 15 Aug 2023 14:14:37 +0330 Subject: [PATCH] fix: subjectFullStop triple dot title ending --- @commitlint/rules/src/subject-full-stop.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/@commitlint/rules/src/subject-full-stop.ts b/@commitlint/rules/src/subject-full-stop.ts index c00161f5ab..61e156f559 100644 --- a/@commitlint/rules/src/subject-full-stop.ts +++ b/@commitlint/rules/src/subject-full-stop.ts @@ -14,7 +14,16 @@ export const subjectFullStop: SyncRule = ( const input = parsed.header; const negated = when === 'never'; - const hasStop = input[input.length - 1] === value; + let hasStop = null; + + if(value !== '.') + { + hasStop = input[input.length - 1] === value; + } + else + { + hasStop = input.endsWith(".") && !input.endsWith(".."); + } return [ negated ? !hasStop : hasStop,