Confusing JSHint errors and pop-ups

I'm a little confused at these new (?) JSHint "errors" I'm seeing scattered all over our .js files now:

I already know 'let' is available in ES6... why is this a red squiggly underline error?! What am I supposed to do here?

What? When did this become a rule? Double-quotes and single-quotes work the same way in JavaScript. Why must I always use the Shift button with my quote button in strings? That's only nice when you need a word contraction or I want to use single-quoted text inside of a double-quoted string.

I'm confused by this... I don't even know where to start. It's a typical check for 'if this thing is not truthy'. What's confusing about it?

The full line is like this:

`if (!$('input[name^="some_thing[here_yay]"]').length > 0) {`

OK maybe it could be written better (maybe wrapping the `left > 0` in their own parentheses), but otherwise I don't know what's confusing about it. Since when do computers get confused? That seems a bit overly-anthropomorphic.

Unlike normal "errors" I see in PHPStorm in .js files, where hovering over their squiggly underlined text would pop up a nice explanation then a suggestion to select to "fix" it, there's no explanation, strange/cryptic errors, and no clickable suggestion (like with `var`).

I mean, if JSHint is just like "It may be a little more readable if you kinda did it this other way, that'd be grrreat", then why use red squigglies as the default?! I always see red errors as "REALLY BAD!", not a stylistic or subjectively-readable thing. Now I need to go through each one and lighten the color so I'm not distracted? Maybe this thing is just better disabled somewhere...


All the errors come from JSHint. If you don't use it, you should disable it in File | Settings | Languages & Frameworks | JavaScript | Code Quality Tools | JSHint.


I don't understand it and trying to use it seems to just cause problems, so I disabled it, thank you.


Please sign in to leave a comment.