本文介绍了JShint不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用npm install -g jshint安装了jshint.我不知道我的节点安装是否有问题,或者什么,但是在终端中运行jshint时它什么也没做.它没有显示任何内容,但在下一个终端提示出现时会显示空白行.在运行npm install -g jshint命令后,在升级之前遇到了麻烦之后,重新安装了节点之后,它看起来不像通常那样运行.这是尝试安装jshint的输出.

I installed jshint using npm install -g jshint. I'm not sure if there is a problem with my node installation or what but when in the terminal and I run jshint it doesn't do anything. It doesn't show anything but a blank line them the next terminal prompt comes up. After a new install of node after having previous troubles after an upgrade when I ran the npm install -g jshint command it didn't look like it ran like it usually does. Here is the output from trying to install 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] /Users/michael/.nvm/v0.10.32/lib/node_modules/jshint
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

推荐答案

您的安装似乎正常.

要使用它,只需键入:

jshint yourfile.js

您也可以将其用于整个目录.例如,要在当前目录中使用它:

You can also use it for a whole directory. For example, to use it in the current directory:

jshint .

如果JSHint没有发现任何错误,则不会输出任何内容.所以这可能是这里的问题".

If JSHint doesn't find any errors, it doesn't output anything. So that might be the "problem" here.

这篇关于JShint不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 19:13