function reportIfUnnecessary(node) {
            if (!node.label) {
                return;
            }

            const labelNode = node.label;

            for (let info = scopeInfo; info !== null; info = info.upper) {
                if (info.breakable || info.label && info.label.name === labelNode.name) {
                    if (info.breakable && info.label && info.label.name === labelNode.name) {
                        context.report({
                            node: labelNode,
                            messageId: "unexpected",
                            data: labelNode,
                            fix: fixer => fixer.removeRange([sourceCode.getFirstToken(node).range[1], labelNode.range[1]])
                        });
                    }
                    return;
                }
            }
        }
function reportIfUnnecessary(node) {
            if (!node.label) {
                return;
            }

            const labelNode = node.label;

            for (let info = scopeInfo; info !== null; info = info.upper) {
                if (info.breakable || info.label && info.label.name === labelNode.name) {
                    if (info.breakable && info.label && info.label.name === labelNode.name) {
                        context.report({
                            node: labelNode,
                            messageId: "unexpected",
                            data: labelNode,
                            fix: fixer => fixer.removeRange([sourceCode.getFirstToken(node).range[1], labelNode.range[1]])
                        });
                    }
                    return;
                }
            }
        }
function reportIfUnnecessary ( node ) { if ( ! node . label ) { return ; } const labelNode = node . label ; for ( let info = scopeInfo ; info !== null ; info = info . upper ) { if ( info . breakable || info . label && info . label . name === labelNode . name ) { if ( info . breakable && info . label && info . label . name === labelNode . name ) { context . report ( { node : labelNode , messageId : "unexpected" , data : labelNode , fix : fixer => fixer . removeRange ( [ sourceCode . getFirstToken ( node ) . range [ 1 ] , labelNode . range [ 1 ] ] ) } ) ; } return ; } } }
Reports a given control node if it's unnecessary.

@param {ASTNode} node - A node. This is a BreakStatement or a
ContinueStatement.
@returns {void}
Reports a given control node if it s unnecessary .
Reports if a node is unnecessary.