Closed TitanNano closed 10 years ago
I believe this code should be complained about. JSHint (and other JS linters) purposes is to make sure you structure your code in a way that is sustainable, however permissive JavaScript itself might be. It restricts JS in a way, allowing you much less "freedom". One should either restructure the code as per JSHint guidance or not use it.
At any rate, this project is Brackets extension based on JSHint, not JSHint itself. Please file these issues with JSHint.
Hey,
JSHint always complains about '[variable-name] used out of scope' when I define a variable with 'var' in an if or loop block and then use it outside the block like this:
This behavior is wrong because the scope for variables defined with var only changes in function blocks. Hope you can fix this, it is relay annoying.