Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSHint and eclipse plugin

So I just installed JSHint in Eclipse Kepler I loaded my .jshintrc file .

How do I run jshint on my javascript files? I do not see a menu item nor a place to specify filenames, etc...

Can someone help?

like image 240
reza Avatar asked Oct 10 '14 23:10

reza


People also ask

How to use JSHint in Eclipse?

To enable checks in Eclipse go to Window –> Preferences –> JSHint –> Configuration and import the . jshintrc file in your project root. Now right click on your project in the project explorer, choose properties –> JSHint and enable checks for all files you like.

How to Install JSHint in Eclipse?

JSHint Eclipse is available in the Eclipse Marketplace. The easiest way to install it is to drag the icon on the start page into your Eclipse. You can also open the marketplace dialog in Eclipse (Help > Eclipse Marketplace…) and search for “jshint”.


1 Answers

After adding a .jshintrc file to the root of the project you need to:

Right-click on your project in the Project Explorer view -> properties -> JSHint -> Configuration -> Check enable.

Also select the folders containing your js files (use slashes in the path). I split my js files into two folders custom and external and only check on custom (and all subfolders of custom).

like image 65
Christophe Roussy Avatar answered Oct 20 '22 00:10

Christophe Roussy