eslint-plugin-comment-length
Version:
An ESLint plugin that provides rules that limit the line length of your comments
13 lines (10 loc) • 368 B
text/typescript
import { type Context } from "../typings.context.js";
import { isURL } from "./is-url.js";
export function isLineOverflowing(line: string, context: Context): boolean {
return (
(!context.ignoreUrls || !isURL(line)) &&
line.trim().split(" ").length > 1 &&
line.length + context.whitespace.size + context.boilerplateSize >
context.maxLength
);
}