views:

710

answers:

1

Can anyone point to a functioning JSLint plugin for eclipse (3.5)?

thanks

+2  A: 

Sure, there is a plugin here and it works ok. The update site is http://update.rockstarapps.com/site.xml

You can also run JSLint as an external tool, but I've never tried that.
Instructions copied here for posterity's sake:

  1. download and install JSRhino
  2. make it somehow available, e.g. create a js.bat (one line: java -jar "path/to/rhino/js.jar" %* )
  3. download JSLint and put it in some folder, e.g. /path/to/jslint.js
  4. Add an external tool configuration in Eclipse:
    Location: path/to/js.bat
    Working Directory: ${workspace_loc}
    Arguments: path/to/jslint.js ${resource_loc}
    You can now check your JavaScript code with JSLint by calling this external tool.
Martin
You might find jslint4java to be easier to integrate. It's just a "java -jar" command. http://code.google.com/p/jslint4java/
Dominic Mitchell