UNPKG

@isentinel/eslint-plugin-comment-length

Version:
22 lines 942 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.detectOverflowInMultilineBlocks = void 0; const is_line_overflowing_1 = require("../../utils/is-line-overflowing"); function detectOverflowInMultilineBlocks(ruleContext, context, blocks) { const problematicBlocks = []; // ... and then we can go through each block to determine if it violates // our rule to mark it as fixable using logic similar to the single-line // rule. for (const block of blocks) { for (let i = 0; i < block.lines.length; i++) { const line = block.lines[i]; if (line && (0, is_line_overflowing_1.isLineOverflowing)(line, context)) { problematicBlocks.push(block); break; } } } return problematicBlocks; } exports.detectOverflowInMultilineBlocks = detectOverflowInMultilineBlocks; //# sourceMappingURL=detect.overflow.js.map