function checkConditional(node) {
            const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?");
            const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":");

            if (nonSpacedConsequesntNode) {
                report(node, nonSpacedConsequesntNode);
            } else if (nonSpacedAlternateNode) {
                report(node, nonSpacedAlternateNode);
            }
        }
function checkConditional(node) {
            const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?");
            const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":");

            if (nonSpacedConsequesntNode) {
                report(node, nonSpacedConsequesntNode);
            } else if (nonSpacedAlternateNode) {
                report(node, nonSpacedAlternateNode);
            }
        }
function checkConditional ( node ) { const nonSpacedConsequesntNode = getFirstNonSpacedToken ( node . test , node . consequent , "?" ) ; const nonSpacedAlternateNode = getFirstNonSpacedToken ( node . consequent , node . alternate , ":" ) ; if ( nonSpacedConsequesntNode ) { report ( node , nonSpacedConsequesntNode ) ; } else if ( nonSpacedAlternateNode ) { report ( node , nonSpacedAlternateNode ) ; } }
Check if the node is conditional
@param {ASTNode} node node to evaluate
@returns {void}
@private
Check if the node is conditional
Check if a conditional node is valid