Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jshint ignore Use '!==' to compare with ''

How can I configure JSHint to ignore this error: Use '!==' to compare with ''. ?

I want that this code pass:

/*jshint undef: false */
if (a == true) {

}
like image 815
Charles Avatar asked Feb 15 '13 12:02

Charles


1 Answers

The solution is to install the new version of jshint:

npm install -g https://github.com/jshint/jshint/archive/1.0.0-rc4.tar.gz

Then to use this config:

{
    "-W041": false
}

Finally this command

jshint --config jshint.json file.js

like image 172
Charles Avatar answered Sep 28 '22 09:09

Charles