function isLoneBlock(node) {
            return node.parent.type === "BlockStatement" ||
                node.parent.type === "Program" ||

                // Don't report blocks in switch cases if the block is the only statement of the case.
                node.parent.type === "SwitchCase" && !(node.parent.consequent[0] === node && node.parent.consequent.length === 1);
        }
function isLoneBlock(node) {
            return node.parent.type === "BlockStatement" ||
                node.parent.type === "Program" ||

                // Don't report blocks in switch cases if the block is the only statement of the case.
                node.parent.type === "SwitchCase" && !(node.parent.consequent[0] === node && node.parent.consequent.length === 1);
        }
function isLoneBlock ( node ) { return node . parent . type === "BlockStatement" || node . parent . type === "Program" || // Don't report blocks in switch cases if the block is the only statement of the case. node . parent . type === "SwitchCase" && ! ( node . parent . consequent [ 0 ] === node && node . parent . consequent . length === 1 ) ; }
Checks for any ocurrence of a BlockStatement in a place where lists of statements can appear
@param {ASTNode} node The node to check
@returns {boolean} True if the node is a lone block.
Checks for any ocurrence of a BlockStatement in a place where lists of statements can appear
Check if the node is a single block