I have downloaded and set up jslint4java. When I use the following command:
java -jar C:\...\jslint4java-2.0.0.jar --encoding UTF-8 --indent 4 --browser *.js
Although there are some unused variables in the file, jsLint does not complain about them. I want it to. But I did not find any appropriate option in the command line docu.
Any advice on what setting I am missing there?
Note: This is about variables not method parameters. I found the --unparam
option, but it is about parameters, and it is for dis-abling rather than for en-abling the check. I do not use this option, so the check is supposed to work.
The jslint for Visual Studio plug-in does complain about the unused variables.
Simple code example:
$(document).ready(function() {
var a = 0,
b = 1;
alert(b);
});
In this example, the jslint for Visual Studio plug-in correctly complains about variable a
not being used, whilst jslint4java doesn't.