Is there a working JSLint Eclipse plug-in?

EclipseEclipse PluginJslint

Eclipse Problem Overview


Can anyone point to a functioning JSLint plug-in for Eclipse?

Eclipse Solutions


Solution 1 - 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.

Solution 2 - Eclipse

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</del> (site down 2012-07-24)

You can also run jslint4java as an external tool:

  1. Download jslint4java
  2. Put jslint4java.jar somewhere
  3. Add an external tool configuration in Eclipse (Run > External Tools > External Tools Configurations > Program > New...):
    Location: /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.

Solution 3 - Eclipse

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: >

  1. Open Aptana Studio- Go to Window > Preferences
  2. Go to Aptana > Editors > JavaScript > Validation in the left hand menu
  3. Check "JSLint JavaScript Validator"- Hit OK- Go to Window > Show View > Validation (may need to go to Show View - Other - Aptana Views)
  4. 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

Solution 4 - Eclipse

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/

Solution 5 - Eclipse

I do this a different way that integrates nicely with the IDE In eclipse most of this is one time set up and then it becomes quite easy to validate your code after that.

  1. Help -> Install new software
  2. Click the 'Add' button
  1. expend the selection and check Rockstar JsLint
  2. Click 'Next'...again
  3. Accept and install
  • (you'll have to hit okay when it prompts you about installing unsigned content).
  1. Restart Eclipse...

Almost done

Now when you want to validate your javascript right click the file Rockstarapps -> Validate with JsLint...

customize your validation settings and your done. (i usually just choose recommended) the problems will show up in your problems panel.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNikitaView Question on Stackoverflow
Solution 1 - EclipsePaul BeusterienView Answer on Stackoverflow
Solution 2 - EclipseMartinView Answer on Stackoverflow
Solution 3 - EclipseAdrian J. MorenoView Answer on Stackoverflow
Solution 4 - EclipsetreejanitorView Answer on Stackoverflow
Solution 5 - Eclipseuser238638View Answer on Stackoverflow