lib/rules/comma-dangle.js
function isMultiline(node) {
            const lastItem = getLastItem(node);

            if (!lastItem) {
                return false;
            }

            const penultimateToken = getTrailingToken(node, lastItem);
            const lastToken = sourceCode.getTokenAfter(penultimateToken);

            return lastToken.loc.end.line !== penultimateToken.loc.end.line;
        }
function isMultiline(node) {
            const lastItem = getLastItem(node);

            if (!lastItem) {
                return false;
            }

            const penultimateToken = getTrailingToken(node, lastItem);
            const lastToken = sourceCode.getTokenAfter(penultimateToken);

            return lastToken.loc.end.line !== penultimateToken.loc.end.line;
        }
function isMultiline ( node ) { const lastItem = getLastItem ( node ) ; if ( ! lastItem ) { return false ; } const penultimateToken = getTrailingToken ( node , lastItem ) ; const lastToken = sourceCode . getTokenAfter ( penultimateToken ) ; return lastToken . loc . end . line !== penultimateToken . loc . end . line ; }
Checks whether or not a given node is multiline.
This rule handles a given node as multiline when the closing parenthesis
and the last element are not on the same line.

@param {ASTNode} node - A node to check.
@returns {boolean} `true` if the node is multiline.
Checks whether or not a given node is multiline . This rule handles a given node as multiline when the closing parenthesis and the last element are not on the same line .