-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Incorrect "used before declared" warning for const value #2838
Closed
twhb opened this issue
Jan 20, 2016
· 1 comment
· Fixed by chauncey-garrett/dotfiles#15 · May be fixed by ajesse11x/cjdns#1
Closed
Incorrect "used before declared" warning for const value #2838
twhb opened this issue
Jan 20, 2016
· 1 comment
· Fixed by chauncey-garrett/dotfiles#15 · May be fixed by ajesse11x/cjdns#1
Comments
Thanks for the report! This has been fixed and will be available in the next release of JSHint (post 2.9.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following code:
I get a single warning: "15: 'x' was used before it was declared, which is illegal for 'const' variables."
The code runs fine. I'm not sure if some people consider this bad style, but either way it doesn't seem to be something JSHint means to enforce, as you get no warning if you comment out either
foo
orbar
.Tested in v2.9.1.
The text was updated successfully, but these errors were encountered: