Skip to content

Commit

Permalink
Chore: removed unused code related to scopeMap (#7218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yang Su authored and gyandeeps committed Sep 26, 2016
1 parent d154204 commit 27042d2
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/eslint.js
Expand Up @@ -585,7 +585,6 @@ module.exports = (function() {
let messages = [],
currentConfig = null,
currentScopes = null,
scopeMap = null,
scopeManager = null,
currentFilename = null,
traverser = null,
Expand Down Expand Up @@ -706,7 +705,6 @@ module.exports = (function() {
messages = [];
currentConfig = null;
currentScopes = null;
scopeMap = null;
scopeManager = null;
traverser = null;
reportingConfig = [];
Expand Down Expand Up @@ -871,24 +869,6 @@ module.exports = (function() {

currentScopes = scopeManager.scopes;

/*
* Index the scopes by the start range of their block for efficient
* lookup in getScope.
*/
scopeMap = [];

currentScopes.forEach(function(scope, index) {
const range = scope.block.range[0];

/*
* Sometimes two scopes are returned for a given node. This is
* handled later in a known way, so just don't overwrite here.
*/
if (!scopeMap[range]) {
scopeMap[range] = index;
}
});

// augment global scope with declared global variables
addDeclaredGlobals(ast, currentScopes[0], currentConfig);

Expand Down

0 comments on commit 27042d2

Please sign in to comment.