I'm moving from checking files with jslint to jshint but the command line statement doesn't seem to work.
For jslint I used the command rhino /home/mrtest/Desktop/jslint.js browser.js which worked. I tried the same thing with rhino /home/mrtest/Desktop/jshint.js browser.j开发者_Go百科s which didn't do anything.
What am I doing wrong?
Thanks.
You need to use the rhino.js file in the env directory of the full codebase: https://github.com/jshint/jshint/
e.g. rhino /home/mrtest/Desktop/jshint/env/rhino.js browser.js
Installing JsHint on Ubuntu 10.04
Assumes rhino is already installed.
- Download latest jshint master (tar.gz) from https://github.com/jshint/jshint/archives/master
- Untar into ~/bin/
cd ~/bin/jshint-jshint-09e24d8make rhino
Can now use:
~/bin/jshint-jshint-09e24d8/build/jshint-rhino.js MyJsFile.js
or more conveniently:
alias jshint='~/bin/jshint-jshint-09e24d8/build/jshint-rhino.js'
$ jshint MyJsFile.js
The same will work on most Linux flavours.
加载中,请稍侯......
精彩评论