lib/rules/new-cap.js
function report(node, messageId) {
            let callee = node.callee;

            if (callee.type === "MemberExpression") {
                callee = callee.property;
            }

            context.report({ node, loc: callee.loc.start, messageId });
        }
function report(node, messageId) {
            let callee = node.callee;

            if (callee.type === "MemberExpression") {
                callee = callee.property;
            }

            context.report({ node, loc: callee.loc.start, messageId });
        }
function report ( node , messageId ) { let callee = node . callee ; if ( callee . type === "MemberExpression" ) { callee = callee . property ; } context . report ( { node , loc : callee . loc . start , messageId } ) ; }
Reports the given messageId for the given node. The location will be the start of the property or the callee.
@param {ASTNode} node CallExpression or NewExpression node.
@param {string} messageId The messageId to report.
@returns {void}
Reports the given messageId for the given node . The location will be the start of the property or the callee .