lib/rules/prefer-template.js
function hasStringLiteral(node) {
    if (isConcatenation(node)) {

        // `left` is deeper than `right` normally.
        return hasStringLiteral(node.right) || hasStringLiteral(node.left);
    }
    return astUtils.isStringLiteral(node);
}
function hasStringLiteral(node) {
    if (isConcatenation(node)) {

        // `left` is deeper than `right` normally.
        return hasStringLiteral(node.right) || hasStringLiteral(node.left);
    }
    return astUtils.isStringLiteral(node);
}
function hasStringLiteral ( node ) { if ( isConcatenation ( node ) ) { // `left` is deeper than `right` normally. return hasStringLiteral ( node . right ) || hasStringLiteral ( node . left ) ; } return astUtils . isStringLiteral ( node ) ; }
Checks whether or not a given binary expression has string literals.
@param {ASTNode} node - A node to check.
@returns {boolean} `true` if the node has string literals.
Checks whether or not a given binary expression has string literals .