[英]Running jshint with rhino
I'm moving from checking files with jslint to jshint but the command line statement doesn't seem to work.我正在从使用 jslint 检查文件转移到 jshint,但命令行语句似乎不起作用。
For jslint I used the command rhino /home/mrtest/Desktop/jslint.js browser.js
which worked.对于 jslint,我使用了有效的命令
rhino /home/mrtest/Desktop/jslint.js browser.js
。 I tried the same thing with rhino /home/mrtest/Desktop/jshint.js browser.js
which didn't do anything.我用
rhino /home/mrtest/Desktop/jshint.js browser.js
尝试了同样的事情,但没有做任何事情。
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/需要使用完整代码库的
env
目录下的rhino.js
文件: https://github.com/jshint/jshint/
eg rhino /home/mrtest/Desktop/jshint/env/rhino.js browser.js
例如
rhino /home/mrtest/Desktop/jshint/env/rhino.js browser.js
Installing JsHint on Ubuntu 10.04在 Ubuntu 10.04 上安装 JsHint
Assumes rhino is already installed.假设 rhino 已经安装。
cd ~/bin/jshint-jshint-09e24d8
make 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.这同样适用于大多数 Linux 风格。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.