在Windows中不能将GLOB与JSHint一起使用? [英] Cannot use GLOB with JSHint in Windows?

查看:103
本文介绍了在Windows中不能将GLOB与JSHint一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做NPM的PoC作为构建工具( http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ )。我使用NPM相当新。目前,我只安装了JSHint和Mocha。我的packagae.json已附上。现在,当我在命令行(Windows 7)中运行npm run lint时,它给出了一个错误:

I'm doing a PoC of NPM as a build tool (http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/). I'm fairly new using NPM. For now, I only have JSHint and Mocha installed. My packagae.json is attached. Now, when I run "npm run lint" in the command line (Windows 7), it gives me an error:

c:\project>npm run list
MyNPMProject@1.0.0 lint c:\project
jshint test/*.js




错误:无法打开测试/ * .js

ERROR: Can't open test/*.js

当我更改脚本lint:jshint test / test.js时,它可以工作。

It works when I change the script "lint": "jshint test/test.js".

我可以在jshint中使用glob吗?

Can I use glob with jshint?

请提前告知并谢谢你。

推荐答案

你不应该需要全球,只需给它目录,它将扫描那里的所有js文件。

You shouldn't need the glob, just give it the directory and it will scan all js files in there.

这篇关于在Windows中不能将GLOB与JSHint一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆