UNPKG

@isentinel/eslint-plugin-comment-length

Version:
16 lines (11 loc) 414 B
import { TSESLint, TSESTree } from "@typescript-eslint/utils"; import { Context } from "../../typings.context"; import { formatBlock } from "./util.format-block"; export function fixOverflow( fixer: TSESLint.RuleFixer, fixableComment: TSESTree.LineComment, context: Context, ) { const newValue = formatBlock(fixableComment, context); return fixer.replaceTextRange(context.comment.range, newValue); }