eslint-plugin-comment-length
Version:
An ESLint plugin that provides rules that limit the line length of your comments
19 lines (17 loc) • 422 B
text/typescript
import { isPunctuation } from "./is-punctuation.js";
export function isAnotherWrapPointComing(
currentLength: number,
maxLength: number,
wordsToCome: string[],
): boolean {
for (const word of wordsToCome) {
if (isPunctuation(word.at(-1)) && word.length > 1) {
return true;
}
currentLength += word.length + 1;
if (currentLength >= maxLength) {
return false;
}
}
return false;
}