SublimeLinter/SublimeLinter-jshint — pull request #16 by mokkabonna (2014-01-14 10:33:28+00:00)
Title: Added special highlighting of unused, non strict comparison and ++/--

As you suggested (#15) I took a stab at it, but instead of using near, which only matches the first word, and can cause problems with multiple occurences of the word or symbols like ==/!= etc I modify the column information.

This is how this implementation will look now on this example case:
![highlight](https://f.cloud.github.com/assets/230877/1909766/7acc30ca-7d06-11e3-8656-25f1946a94da.png)

This was run with this jshintrc.

{
"bitwise": true,
"curly": false,
"eqeqeq": true,
"forin": false,
"immed": true,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": false,
"plusplus": true,
"regexp": false,
"undef": true,
"strict": true,
"trailing": false,
"asi": false,
"boss": false,
"debug": false,
"eqnull": false,
"es3": true,
"esnext": false,
"evil": false,
"expr": false,
"unused": true,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"multistr": false,
"onecase": false,
"proto": false,
"regexdash": false,
"scripturl": false,
"smarttabs": true,
"shadow": false,
"sub": false,
"supernew": false,
"validthis": true,
"browser": true,
"couch": false,
"devel": false,
"dojo": false,
"jquery": false,
"mootools": false,
"node": false,
"nonstandard": false,
"prototypejs": false,
"rhino": false,
"wsh": false,
"nomen": false,
"onevar": true,
"passfail": false,
"white": false,
"maxerr": 100
}

On the code:

function unusedfunc() {}

function test(unusedarg) {
var unused = { //missing use strict and unused
extracomma:5, //extra comma
};
var anothervar = 5;
if (5 == 4 && 5 == 3 && 4 != 5) {
anothervar++;
anothervar--;
}

with(window){
return;
}

if(true){} //empty block
}

test() //missing semicolon