lib/rules/no-alert.js
function isGlobalThisReferenceOrGlobalWindow(scope, node) {
    if (scope.type === "global" && node.type === "ThisExpression") {
        return true;
    }
    if (node.name === "window") {
        return !isShadowed(scope, node);
    }

    return false;
}
function isGlobalThisReferenceOrGlobalWindow(scope, node) {
    if (scope.type === "global" && node.type === "ThisExpression") {
        return true;
    }
    if (node.name === "window") {
        return !isShadowed(scope, node);
    }

    return false;
}
function isGlobalThisReferenceOrGlobalWindow ( scope , node ) { if ( scope . type === "global" && node . type === "ThisExpression" ) { return true ; } if ( node . name === "window" ) { return ! isShadowed ( scope , node ) ; } return false ; }
Checks if the given identifier node is a ThisExpression in the global scope or the global window property.
@param {Object} scope The current scope.
@param {string} node The identifier node to check
@returns {boolean} Whether or not the node is a reference to the global object.
Checks if the given identifier node is a ThisExpression in the global scope or the global window property .