-
Notifications
You must be signed in to change notification settings - Fork 77
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
Misses class references #49
Comments
Looks like |
I tried to figure this out, but I'm still really unfamiliar with how variables are added to scopes and counted as references. :( |
Top-level classes should add their binding to the lexical contour because they create block bindings, not var bindings. |
I'll investigate it. |
Hm, I've created the test and it seems passed.
Currently, |
This is how ESLint determines if a global reference is unresolved:
You can see the code here: https://github.com/eslint/eslint/blob/master/lib/rules/no-unused-vars.js#L137 So, the problem is that |
@Constellation Top-level block bindings ( |
Adding to the global scope is also causing issues as it relates to module imports in ESLint. |
Correct? According to the 14.5.16 http://people.mozilla.org/~jorendorff/es6-draft.html#sec-class-definitions-runtime-semantics-evaluation
And 14.5.15 http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-bindingclassdeclarationevaluation
And at that time, env is the environment record of global scope, |
@Constellation: Okay, I was thinking about Modules.
Only for Script evaluation. See steps 6 and 7 from 15.1.7:
For modules,
This is the "lexical contour" I was talking about. |
The 2.0.5 version misses references to classes, such as:
escope fails to identify
new Shoe()
as a reference.The text was updated successfully, but these errors were encountered: