Before using JSLint to validate JavaScript code and find that there is not enough flexibility, use jshint instead. Officially, Jshint is a community-driven (community-driven) tool for detecting errors and potential problems in JavaScript code, standardizing the coding style, and ensuring the quality of the code. Jshint has made a lot of improvements based on JSLint, allowing developers to define their own validation options.
Jshint home:http://www.jshint.com/
Jshint options:http://www.jshint.com/options/
Jshint for eclipse:http://github.eclipsesource.com/jshint-eclipse/
Installation method
Latest stable version update URL:
http://github.eclipsesource.com/jshint-eclipse/updates/
On the Eclipse main menu, click: Help > Install New software ...
Enter the URL above, then select Jshint Eclipse Integration
The following installation process is simple, press down to confirm it.
Update method
If it is already installed, you can update it:
On the Eclipse main menu, click: Help > Check for Updates
Uninstall method
You can uninstall it as follows:
On the Eclipse main menu, click: Help > About Eclipse > Installation Details
Select Jshint Eclipse integration, click Uninstall
How to use
In the project that contains the JavaScript file, open the right-click menu, select Properties
On the Jshint page, tick the Enable Jshint for this project
You can select the Exclude this folder from Jshint validation Cancel check in the properties of the right-click
Using Jshint to check JavaScript in eclipse