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.
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.
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).
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