我使用 npm install -g jshint 安装了 jshint。我不确定我的节点安装是否有问题或者是什么问题,但是当我在终端中运行 jshint 时,它不会执行任何操作。下一个终端提示出现时,除了空白行外,它不显示任何内容。在升级后遇到先前的问题后,重新安装节点后,当我运行 npm install -g jshint 命令时,它看起来不像通常那样运行。这是尝试安装 jshint 的输出。
$ npm install -g jshint
/Users/michael/.nvm/v0.10.32/bin/jshint -> /Users/michael/.nvm/v0.10.32/lib/node_modules/jshint/bin/jshint
[email protected] /cdn-cgi/l/email-protection /Users/michael/.nvm/v0.10.32/lib/node_modules/jshint
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
├── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection, domhan[email protected] /cdn-cgi/l/email-protection, [email protected] /cdn-cgi/l/email-protection)
└── [email protected] /cdn-cgi/l/email-protection ([email protected] /cdn-cgi/l/email-protection)
你的安装看起来不错。
要使用它,只需输入:
jshint yourfile.js
您还可以将其用于整个目录。例如,要在当前目录中使用它:
jshint .
如果 JSHint 没有发现任何错误,它不会输出任何内容。所以这可能就是这里的“问题”。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)