JSLint error checking as a build step

1.5k Views Asked by At

I would like to run JSlint against my JS files in my web project and I was wondering if this can be made as part of the build step where in the build fails if and when there are js errors in the file. Is there a way to do this?

Thanks in advance.

2

There are 2 best solutions below

0
On BEST ANSWER

There is this http://sedodream.codeplex.com/ MSBuild extension which contains a JSLint task. It uses rather an old version of JSLint, but you can download the source and upgrade to the latest JSLint version.

You can also take a look at the author's blog to see how to integrate it to your build: MSBuild + JSLint = Good Javascript

1
On

If you can arrange for your build to invoke an external command, check out jslint4java. It's a single jar file that can invoke jslint over a set of files for you (disclaimer: I am the author).