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
members of Object.prototype shouldn't be treated as undeclared variables in no-undef #180
Comments
JSHint warns on these. Is there a reason we should act differently? |
The rule is described as "locate potential ReferenceErrors resulting from mispellings [sic] of variable and parameter names or accidental implicit globals". The members of |
Strictly speaking the current behaviour is compliant to ECMAScript, because the [[Prototype]] of the global object is implementation specific. That means a compliant ECMAScript implementation can set the global object's [[Prototype]] to |
That's a very good point. Given that, I think we should stick with the current behavior. |
@anba: That's a really good point. I had always taken it for granted that the global object's |
ECMA-262 bug filed here: https://bugs.ecmascript.org/show_bug.cgi?id=1714. The spec will soon enforce that |
See discussion in #164. Related: #6.
The text was updated successfully, but these errors were encountered: