lib/rules/vars-on-top.js
function blockScopeVarCheck(node, parent, grandParent) {
            if (!(/Function/u.test(grandParent.type) &&
                    parent.type === "BlockStatement" &&
                    isVarOnTop(node, parent.body))) {
                context.report({ node, messageId: "top" });
            }
        }
function blockScopeVarCheck(node, parent, grandParent) {
            if (!(/Function/u.test(grandParent.type) &&
                    parent.type === "BlockStatement" &&
                    isVarOnTop(node, parent.body))) {
                context.report({ node, messageId: "top" });
            }
        }
function blockScopeVarCheck ( node , parent , grandParent ) { if ( ! ( / Function / u . test ( grandParent . type ) && parent . type === "BlockStatement" && isVarOnTop ( node , parent . body ) ) ) { context . report ( { node , messageId : "top" } ) ; } }
Checks whether variable is on top at functional block scope level
@param {ASTNode} node - The node to check
@param {ASTNode} parent - Parent of the node
@param {ASTNode} grandParent - Parent of the node's parent
@returns {void}
Checks whether variable is on top at functional block scope level