mavenjshintwro4j

Why do I get "Bad option: 'unused'" when I try to apply the 'unused' option in the wro4j jshint plugin (v1.4.7)?


All the other options I need to use are working nicely but when I add the 'unused' option, I get a complaint when I try either:

<options>unused,bitwise,curly,eqeqeq,forin,immed,indent=4,latedef,newcap,noarg,nonew,undef,trailing,onevar,white,browser</options>

or

<options>unused=true,bitwise,curly,eqeqeq,forin,immed,indent=4,latedef,newcap,noarg,nonew,undef,trailing,onevar,white,browser</options>

I get this error:

 Errors are: [ro.isdc.wro.extensions.processor.support.linter.LinterError@373246f3[
  line=0
  character=0
  reason=Bad option: 'unused'.
  evidence=
]]

I am not sure if I am using incorrect syntax, this option is just not available in this plugin or if this is a bug.

Has anyone else had it working correctly and am I doing something wrong?


Solution

  • The wro4j-1.4.7 uses an older version of jshint (more precisely from July 06, 2012), while unused option was introduced since August 20th, 2012

    If you want to use latest version of JsHint, you can extend the JsHintProcessor and specify the newer version of jshint.js