-
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
JSHint reports an implied global variable when it is not global #668
Milestone
Comments
Your code passes fine:
|
After some investigation i found the source of the warnings. It was in the reporter:
So jshint does not warn, but treats and reports them as implied gobal variables when they are not |
Thanks, that looks like a bug. |
jugglinmike
pushed a commit
to jugglinmike/jshint
that referenced
this issue
Oct 21, 2014
We have a pretty hacky code that clears implied variables that were defined later on. The problem is that code is called only when the undef option is on. So this means that when it's off JSHINT.data().implieds array can be populated with false positive data. This patch changes the code so that it always collects and clears undefined variables but checks the undef option when it's ready to warn. Closes jshintGH-668.
danielctull
pushed a commit
to danielctull-forks/jshint
that referenced
this issue
Jan 14, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running JSHint on this piece of code reports 'baz' as an implied global variable when it is not:
The text was updated successfully, but these errors were encountered: