Excluding JS file that are included in the project via Content Include?


We have multiple products that all use some common folders. We're using Visual Studio's ability to include content in a project from outside the project (Content Include) for third party JS libraries and code we write for all projects to use. The code from the third party libraries often don't conform to jsLint or jsHint requirements, so when we run jsHint on our project at build, it reports tons of errors.

We've tried to exclude these folders from jsLint for VS2012 using the provided mechanisms (right click, exclude on build), but whenever the build runs, the files are still checked and errors are reported.

Can anyone tell me the correct way to have these files excluded from these project's build process?

For example, if I have the following Content Include key in .proj file, what is the correct jsLintSkip entry to have in the .proj file to avoid running jsLint on this file?

<Content Include="vendor\jQuery\jquery.min.js" />

What is the correct value for <jsLintSkip> to exclude this included vendor folder so that this file (jQuery) and other's like are NOT run through jsLint at build?

<JSLintSkip>vendor\</JSLintSkip> (?)


jtheriault wrote Mar 20, 2013 at 9:09 PM

It looks as if IsNodeSkipped wrongly assumes a relative name for project items.

Qube wrote Jul 7, 2013 at 5:14 AM

We've got this scenario is working in JSLint.NET. The Visual Studio plugin detects linked files and can ignore them based on their virtual project path.