Skip to content

Commit

Permalink
Chore: remove currentScopes property from Linter instances (refs #9161)…
Browse files Browse the repository at this point in the history
… (#9187)

The `currentScopes` property is undocumented, and is redundant with the `scopeManager` property. This commit removes it.
  • Loading branch information
not-an-aardvark committed Aug 31, 2017
1 parent af4ad60 commit 8ed779c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/linter.js
Expand Up @@ -747,7 +747,6 @@ class Linter {
constructor() {
this.messages = [];
this.currentConfig = null;
this.currentScopes = null;
this.scopeManager = null;
this.currentFilename = null;
this.traverser = null;
Expand All @@ -766,7 +765,6 @@ class Linter {
reset() {
this.messages = [];
this.currentConfig = null;
this.currentScopes = null;
this.scopeManager = null;
this.traverser = null;
this.reportingConfig = [];
Expand Down Expand Up @@ -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));

Expand Down Expand Up @@ -1063,7 +1059,7 @@ class Linter {

}

return this.currentScopes[0];
return this.scopeManager.scopes[0];
}

/**
Expand Down

0 comments on commit 8ed779c

Please sign in to comment.