Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: remove currentScopes property from Linter instances (refs #9161) #9187

Merged
merged 1 commit into from Aug 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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