Skip to content

Instantly share code, notes, and snippets.

@dalager
Created August 30, 2011 11:51
Show Gist options
  • Save dalager/1180730 to your computer and use it in GitHub Desktop.
Save dalager/1180730 to your computer and use it in GitHub Desktop.
Javascript Lint
<?xml version="1.0" encoding="utf-8" ?>
<Project DefaultTargets = "Main" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<siteRoot>$(MSBuildProjectDirectory)\..\Intranet Project\Intranet website</siteRoot>
</PropertyGroup>
<ItemGroup>
<JsFiles Include="$(siteRoot)\content\js\BHFUtil.js" />
<JsFiles Include="$(siteRoot)\content\js\HjaelperProfile\*.js" />
<JsFiles Include="$(siteRoot)\pages\**\*.js" />
<JsFiles Include="$(siteRoot)\matchmaker\**\*.js" />
<JsFiles Include="$(siteRoot)\adressevask\**\*.js" />
</ItemGroup>
<!-- Mayhaps this will be more easy to use later. For now it's too aggressive. -->
<Target Name="java">
<Message Text="@(JsFiles)"/>
<Exec Command="java -jar $(MSBuildProjectDirectory)\jslint4java-2.0.0.jar --plusplus --white --sloppy --browser --nomen --devel --vars --bitwise --predef ko,BHFUtil,__doPostBack,jQuery,$,log %22%(JsFiles.FullPath)%22">
<Output TaskParameter="ExitCode"
PropertyName="JSLintError"/>
</Exec>
</Target>
<Target Name="Main">
<Message Text="@(JsFiles)"/>
<Exec Command="$(MSBuildProjectDirectory)\jsl.exe -conf jsl.default.conf -process %22%(JsFiles.FullPath)%22">
<Output TaskParameter="ExitCode"
PropertyName="JSLintError"/>
</Exec>
</Target>
</Project>
@dalager
Copy link
Author

dalager commented Aug 30, 2011

msbuild snippet for use with http://javascriptlint.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment