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

Standard allows you to use a var before it's declared #659

Closed
dcposch opened this issue Oct 12, 2016 · 2 comments
Closed

Standard allows you to use a var before it's declared #659

dcposch opened this issue Oct 12, 2016 · 2 comments
Labels

Comments

@dcposch
Copy link

dcposch commented Oct 12, 2016

I don't know if this is intentional, but standard doesn't warn about this:

function foo () {
  console.log('' + x) // prints undefined
  var x = 5
}
@qzb
Copy link

qzb commented Oct 12, 2016

Yes, this is intentional (at least for now): #636

@feross
Copy link
Member

feross commented Oct 12, 2016

I would like standard to catch this issue, but can't enable the relevant rule until eslint/eslint#7111 is fixed.

So, yes, this is intentional for now. See #636 (comment) for explanation.

@feross feross closed this as completed Oct 12, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants