eslint-plugin-comment-length
Version:
An ESLint plugin that provides rules that limit the line length of your comments
16 lines (11 loc) • 430 B
text/typescript
import type { TSESLint, TSESTree } from "@typescript-eslint/utils";
import type { Context } from "../../typings.context.js";
import { formatBlock } from "./util.format-block.js";
export function fixOverflow(
fixer: TSESLint.RuleFixer,
fixableComment: TSESTree.LineComment,
context: Context,
) {
const newValue = formatBlock(fixableComment, context);
return fixer.replaceTextRange(context.comment.range, newValue);
}