use globals module instead of maintaining our own list
This commit is contained in:
parent
010ca83d0d
commit
3b7cfc908e
@ -1,64 +0,0 @@
|
||||
[
|
||||
"Set",
|
||||
"Map",
|
||||
"WeakMap",
|
||||
"WeakSet",
|
||||
"Proxy",
|
||||
"Promise",
|
||||
"Reflect",
|
||||
"Symbol",
|
||||
"System",
|
||||
"__filename",
|
||||
"__dirname",
|
||||
"GLOBAL",
|
||||
"global",
|
||||
"module",
|
||||
"require",
|
||||
"Buffer",
|
||||
"console",
|
||||
"exports",
|
||||
"process",
|
||||
"setTimeout",
|
||||
"clearTimeout",
|
||||
"setInterval",
|
||||
"clearInterval",
|
||||
"setImmediate",
|
||||
"clearImmediate",
|
||||
"Array",
|
||||
"Boolean",
|
||||
"Date",
|
||||
"decodeURI",
|
||||
"decodeURIComponent",
|
||||
"encodeURI",
|
||||
"encodeURIComponent",
|
||||
"Error",
|
||||
"eval",
|
||||
"EvalError",
|
||||
"Function",
|
||||
"hasOwnProperty",
|
||||
"isFinite",
|
||||
"isNaN",
|
||||
"JSON",
|
||||
"Map",
|
||||
"Math",
|
||||
"Number",
|
||||
"Object",
|
||||
"Proxy",
|
||||
"Promise",
|
||||
"parseInt",
|
||||
"parseFloat",
|
||||
"RangeError",
|
||||
"ReferenceError",
|
||||
"RegExp",
|
||||
"Set",
|
||||
"String",
|
||||
"SyntaxError",
|
||||
"TypeError",
|
||||
"URIError",
|
||||
"WeakMap",
|
||||
"WeakSet",
|
||||
"arguments",
|
||||
"NaN",
|
||||
"window",
|
||||
"self"
|
||||
]
|
||||
@ -3,11 +3,13 @@
|
||||
module.exports = Scope;
|
||||
|
||||
var traverse = require("./index");
|
||||
var globals = require("globals");
|
||||
var object = require("../helpers/object");
|
||||
var t = require("../types");
|
||||
var each = require("lodash/collection/each");
|
||||
var has = require("lodash/object/has");
|
||||
var contains = require("lodash/collection/contains");
|
||||
var flatten = require("lodash/array/flatten");
|
||||
var defaults = require("lodash/object/defaults");
|
||||
|
||||
var FOR_KEYS = ["left", "init"];
|
||||
@ -35,7 +37,7 @@ function Scope(block, parentBlock, parent, file) {
|
||||
this.declarationKinds = info.declarationKinds;
|
||||
}
|
||||
|
||||
Scope.defaultDeclarations = require("./global-keys");
|
||||
Scope.defaultDeclarations = flatten([globals.builtin, globals.browser, globals.node].map(Object.keys));
|
||||
|
||||
Scope.prototype._add = function (node, references, throwOnDuplicate) {
|
||||
if (!node) return;
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
"estraverse": "1.9.1",
|
||||
"esutils": "1.1.6",
|
||||
"fs-readdir-recursive": "0.1.0",
|
||||
"globals": "^5.1.0",
|
||||
"js-tokenizer": "1.3.3",
|
||||
"lodash": "3.0.0",
|
||||
"output-file-sync": "1.1.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user