The real issue is that, as a programming language, JavaScript is poorly designed and quite broken. Its implementors and community have been quite unwilling to fix these issues, even after a decade and a half. As a result of this, it is still riddled with oddities in even extremely simple constructs.
Even when one understands the reasoning behind why a tool like JSLint suggests what it does, this doesn't change the fact that dietrichepp's observations are correct. JavaScript's scoping and variable hoisting are unnecessarily broken, leading to convoluted coding practices that wouldn't really be necessary if JavaScript itself wasn't so broken.
>[JavaScript's] implementors and community have been quite unwilling to fix these issues [...]
You can't really fix things. It would break the web. You can only add stuff on top.
>JavaScript's scoping and variable hoisting are unnecessarily broken [...]
It will get a bit better with ES6's `let` keyword. Annoyingly, that keyword was introduced with Firefox 2.0 (October 24, 2006) but you still can't use it.
Even when one understands the reasoning behind why a tool like JSLint suggests what it does, this doesn't change the fact that dietrichepp's observations are correct. JavaScript's scoping and variable hoisting are unnecessarily broken, leading to convoluted coding practices that wouldn't really be necessary if JavaScript itself wasn't so broken.