lib/rules/padding-line-between-statements.js
function verifyForNever(context, _, nextNode, paddingLines) {
    if (paddingLines.length === 0) {
        return;
    }

    context.report({
        node: nextNode,
        message: "Unexpected blank line before this statement.",
        fix(fixer) {
            if (paddingLines.length >= 2) {
                return null;
            }

            const prevToken = paddingLines[0][0];
            const nextToken = paddingLines[0][1];
            const start = prevToken.range[1];
            const end = nextToken.range[0];
            const text = context.getSourceCode().text
                .slice(start, end)
                .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines);

            return fixer.replaceTextRange([start, end], text);
        }
    });
}
function verifyForNever(context, _, nextNode, paddingLines) {
    if (paddingLines.length === 0) {
        return;
    }

    context.report({
        node: nextNode,
        message: "Unexpected blank line before this statement.",
        fix(fixer) {
            if (paddingLines.length >= 2) {
                return null;
            }

            const prevToken = paddingLines[0][0];
            const nextToken = paddingLines[0][1];
            const start = prevToken.range[1];
            const end = nextToken.range[0];
            const text = context.getSourceCode().text
                .slice(start, end)
                .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines);

            return fixer.replaceTextRange([start, end], text);
        }
    });
}
function verifyForNever ( context , _ , nextNode , paddingLines ) { if ( paddingLines . length === 0 ) { return ; } context . report ( { node : nextNode , message : "Unexpected blank line before this statement." , fix ( fixer ) { if ( paddingLines . length >= 2 ) { return null ; } const prevToken = paddingLines [ 0 ] [ 0 ] ; const nextToken = paddingLines [ 0 ] [ 1 ] ; const start = prevToken . range [ 1 ] ; const end = nextToken . range [ 0 ] ; const text = context . getSourceCode ( ) . text . slice ( start , end ) . replace ( PADDING_LINE_SEQUENCE , replacerToRemovePaddingLines ) ; return fixer . replaceTextRange ( [ start , end ] , text ) ; } } ) ; }
Check and report statements for `never` configuration.
This autofix removes blank lines between the given 2 statements.
However, if comments exist between 2 blank lines, it does not remove those
blank lines automatically.

@param {RuleContext} context The rule context to report.
@param {ASTNode} _ Unused. The previous node to check.
@param {ASTNode} nextNode The next node to check.
@param {Array<Token[]>} paddingLines The array of token pairs that blank
lines exist between the pair.
@returns {void}
@private
Check and report statements for never configuration . This autofix removes blank lines between the given 2 statements . However if comments exist between 2 blank lines it does not remove those blank lines automatically .