Can anyone point to a functioning JSLint plug-in for Eclipse?
Use this:
In Eclipse, Install New Software to http://svn.codespot.com/a/eclipselabs.org/mobile-web-development-with-phonegap/tags/r1.2/download
I used jslint4java to add jslint to the Eclipse plugin for Android PhoneGap development. If you're not interested in PhoneGap or Android, you can choose only the jslint4java feature in the install wizard
Usage information here.
There is a plugin here and it works ok. (site is down sometime in 2011) The update site is http://update.rockstarapps.com/site.xml (site down 2012-07-24)
You can also run jslint4java as an external tool:
jslint4java.jar
somewhereLocation: /usr/bin/java (or your path to javaw.exe) Arguments: -jar /path/to/jslint4java.jar ${resource_loc}
Now you can select a js file in the Project Explorer and run jslint4java from the external tools menu.
I think I've found the simplest solution. If you install Aptana Studio, a free Eclipse plug-in, you get among other things, an excellent JavaScript IDE with support for Ext, jQuery and other major libraries.
Using these instructions (copied here in case blogspot is blocked at work), you can easily turn on JSLint support.
You can enable it by doing:
- Open Aptana Studio- Go to Window > Preferences
- Go to Aptana > Editors > JavaScript > Validation in the left hand menu
- Check "JSLint JavaScript Validator"- Hit OK- Go to Window > Show View > Validation (may need to go to Show View - Other - Aptana Views)
- You'll see the Validation on the bottom right of the screen- Now also click Toggle Information and Toggle Warnings (found on the top left corner of the validation pane)
You're all set. JSLint will warn you whilst writing code
You might consider a JsHint Eclipse plugin as an alternative. From what the project objective reads, JSHint was originally a fork of JsLHint with more option configuration.
Eclipse plugin http://github.eclipsesource.com/jshint-eclipse/
JsHint reference http://www.jshint.com/about/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With