1

I am using the gulp task runner. For the static code analysis I am trying to use 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.

scripts {
     "lint" : "jshint <path/file.js>"
}

This is very tedious to look up for every js file in the project package.

I am looking for ways to lint all my package js files and log their report in a separate file.

Pranay Nailwal
  • 483
  • 6
  • 13

1 Answers1

0

One minute of googleing got this here http://www.codereadability.com/jshint-with-grunt/#runningjshintonmultiplefilesatonce

So app/**/*.js could do the trick.

Lukas
  • 158
  • 1
  • 10
  • yes. I have looked into those but they don't seem to work. I have added that into the scripts but upon running it shows cant open path/**/*.js. But it does works with *.js only in the current directory and not in the sub folders. – Pranay Nailwal Aug 29 '17 at 09:24