Getting JSLint to break assembly in visual studio 2010

I included JSLint (http://javascriptlint.com) in my post build projects - but can't seem to make it build fail if an error / warning occurs?

JSLint is currently being launched from a .bat file that is launched after build

Is there a parameter that I can pass to tell JSLint about a build failure if an error / warning occurs?

Thanks in advance people

+6
source share
1 answer

The JSLint extension for VS2010 has the ability to automatically display JSLint warnings in the error list. In addition, you can run JSLint during assembly and cancel the assembly if a rule is violated.

Or, if you want to continue running JSLint through a batch script package, you can force MSBuild to raise an error depending on the script's return code:

<Target Name="AfterBuild"> <Exec Command="jslint.bat" ContinueOnError="true"> <Output TaskParameter="ExitCode" PropertyName="ErrorCode" /> </Exec> <Error Text="Error running JSLint" Condition="'$(ErrorCode)'>'0'" /> </Target> 
+5
source

Source: https://habr.com/ru/post/899465/


All Articles