Search code examples
javascriptmsbuildmsbuild-taskjslintcsproj

JSLint error checking as a build step


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.


Solution

  • 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