lib/rules/newline-before-return.js
function hasNewlineBefore(node) {
            const lineNumNode = node.loc.start.line;
            const lineNumTokenBefore = getLineNumberOfTokenBefore(node);
            const commentLines = calcCommentLines(node, lineNumTokenBefore);

            return (lineNumNode - lineNumTokenBefore - commentLines) > 1;
        }
function hasNewlineBefore(node) {
            const lineNumNode = node.loc.start.line;
            const lineNumTokenBefore = getLineNumberOfTokenBefore(node);
            const commentLines = calcCommentLines(node, lineNumTokenBefore);

            return (lineNumNode - lineNumTokenBefore - commentLines) > 1;
        }
function hasNewlineBefore ( node ) { const lineNumNode = node . loc . start . line ; const lineNumTokenBefore = getLineNumberOfTokenBefore ( node ) ; const commentLines = calcCommentLines ( node , lineNumTokenBefore ) ; return ( lineNumNode - lineNumTokenBefore - commentLines ) > 1 ; }
Checks whether node is preceded by a newline
@param {ASTNode} node - node to check
@returns {boolean} Whether or not the node is preceded by a newline
@private
Checks whether node is preceded by a newline