Your issue is not knowing JavaScript. No point to blame a JavaScript linter.
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.
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 Node.js needs a switch.