[英]Linting All JS files in Project Package ::JSHINT
I am using the gulp task runner. 我正在使用gulp任务运行程序。 For the static code analysis I am trying to use JsHint.
对于静态代码分析,我尝试使用JsHint。 The issue here is that I am able to run only one file at a time.
这里的问题是我一次只能运行一个文件。
npm installation has added "gulp-jshint": "~1.11.0", in devDependensies in package.json. npm安装在package.json中的devDependensies中添加了“ gulp-jshint”:“〜1.11.0”。
scripts {
"lint" : "jshint <path/file.js>"
}
This is very tedious to look up for every js file in the project package. 查找项目包中的每个js文件非常繁琐。
I am looking for ways to lint all my package js files and log their report in a separate file. 我正在寻找方法来整理所有我的程序包js文件并将其报告记录在单独的文件中。
One minute of googleing got this here http://www.codereadability.com/jshint-with-grunt/#runningjshintonmultiplefilesatonce 一分钟的Google搜索操作就可以在这里http://www.codereadability.com/jshint-with-grunt/#runningjshintonmultiplefilesatonce
So app/**/*.js
could do the trick. 因此
app/**/*.js
可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.