How to remove equal to 0 warnings using JSHint options?

Hi guys!

I have some JS condition where I use !=0, that means I am looking for a number or string and not an empty or zero value (jsfiddle: https://jsfiddle.net/hjL4eaht/1/)

So I got a warning because JSHint suggest me to use == to avoid empties, what is absolutely understandable, but I don’t need it, so I am disabling it making eqeqeq option to false:



Is not working, I continue getting these warnings, how can I disable them?

Thank you!

Seems this is a long standing bug in jshint:

1 Like

Thankyou @nathanr, You are right, this is a problem for me.

If anyone come to this forum looking for an answer, here you cand find 2 ways to avoid JSHint warnings: https://stackoverflow.com/questions/12977661/is-there-a-way-to-suppress-jshint-warning-for-one-given-line

Not really a solution but a workarround.