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?
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).
As mentioned in this jshint-eclipse
issue :
You have to explicitly enable JSHint for your project.
You can do so by adding a file pattern on theJSHint
page in your project's preferences.
The main contributor to jshint-eclipse
, ralfstx , comments:
Maybe it's not obvious.
I wanted to avoid checking all files by default for performance reasons.
JSHint is written in JavaScript, and running large scripts is not exactly fast.OTOH, checking all
*.js
files by default (maybe excluding.min.js
files) would not affect non-JS projects, and for JS-only workspaces, checking all projects is probably useful...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.