diff --git a/@commitlint/rules/src/subject-full-stop.ts b/@commitlint/rules/src/subject-full-stop.ts index 2a30819b3aa..e3d2e762eb8 100644 --- a/@commitlint/rules/src/subject-full-stop.ts +++ b/@commitlint/rules/src/subject-full-stop.ts @@ -15,7 +15,8 @@ export const subjectFullStop: SyncRule = ( const negated = when === 'never'; let hasStop = input[input.length - 1] === value; - if (input.slice(-3) === '...') { + let ellipsis = '...'; + if (input.length > ellipsis.length && input.slice(-ellipsis.length) === ellipsis) { hasStop = false; }