diff --git a/lib/linter.js b/lib/linter.js index f84b6e6add1..7b3117d9266 100755 --- a/lib/linter.js +++ b/lib/linter.js @@ -747,7 +747,6 @@ class Linter { constructor() { this.messages = []; this.currentConfig = null; - this.currentScopes = null; this.scopeManager = null; this.currentFilename = null; this.traverser = null; @@ -766,7 +765,6 @@ class Linter { reset() { this.messages = []; this.currentConfig = null; - this.currentScopes = null; this.scopeManager = null; this.traverser = null; this.reportingConfig = []; @@ -969,10 +967,8 @@ class Linter { fallback: Traverser.getKeys }); - this.currentScopes = this.scopeManager.scopes; - // augment global scope with declared global variables - addDeclaredGlobals(this.sourceCode.ast, this.currentScopes[0], this.currentConfig, this.environments); + addDeclaredGlobals(this.sourceCode.ast, this.scopeManager.scopes[0], this.currentConfig, this.environments); const eventGenerator = new CodePathAnalyzer(new NodeEventGenerator(emitter)); @@ -1063,7 +1059,7 @@ class Linter { } - return this.currentScopes[0]; + return this.scopeManager.scopes[0]; } /**