Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(explicitGlobals).forEach(function(name) {
var variable = getVariable(globalScope, name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = true;
variable.eslintExplicitGlobalComment = explicitGlobals[name].comment;
globalScope.variables.push(variable);
}
variable.writeable = explicitGlobals[name].value;
});
Object.keys(declaredGlobals).forEach(function(name) {
var variable = globalScope.set.get(name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = false;
globalScope.variables.push(variable);
globalScope.set.set(name, variable);
}
variable.writeable = declaredGlobals[name];
});
Object.keys(declaredGlobals).forEach(function(name) {
var variable = globalScope.set.get(name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = false;
globalScope.variables.push(variable);
globalScope.set.set(name, variable);
}
variable.writeable = declaredGlobals[name];
});
Object.keys(declaredGlobals).forEach(function(name) {
var variable = getVariable(globalScope, name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = false;
globalScope.variables.push(variable);
}
variable.writeable = declaredGlobals[name];
});
Object.keys(explicitGlobals).forEach(function(name) {
var variable = globalScope.set.get(name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = true;
variable.eslintExplicitGlobalComment = explicitGlobals[name].comment;
globalScope.variables.push(variable);
globalScope.set.set(name, variable);
}
variable.writeable = explicitGlobals[name].value;
});
Object.keys(declaredGlobals).forEach(function(name) {
var variable = getVariable(globalScope, name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = false;
globalScope.variables.push(variable);
}
variable.writeable = declaredGlobals[name];
});
function generateGlobalVariable (name, scope) {
const variable = new Variable(name, scope)
variable.eslintExplicitGlobal = false
variable.writeable = true
return variable
}
Object.keys(explicitGlobals).forEach(function(name) {
var variable = globalScope.set.get(name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = true;
variable.eslintExplicitGlobalComment = explicitGlobals[name].comment;
globalScope.variables.push(variable);
globalScope.set.set(name, variable);
}
variable.writeable = explicitGlobals[name].value;
});
Object.keys(declaredGlobals).forEach(function(name) {
var variable = getVariable(globalScope, name);
if (!variable) {
variable = new escope.Variable(name, globalScope);
variable.eslintExplicitGlobal = false;
globalScope.variables.push(variable);
}
variable.writeable = declaredGlobals[name];
});