Travis's lame ol' blog

yay, Travis finally changed his blog!

- Friday, May 13, 2011

Adding An Easy Shortcut to the JSHint javascript validator to Visual Studio

I went to add JSLint to my Visual Studio tools and was disappointed that the WSH version has disappeared (or was discontinued). Luckily the new and improved JSHint supports a WSH wrapper.

  1. Grab JSHLint.

  2. In Visual Studio → Tools → External Tools…

  3. Add a new tool with the following field values:

    Title:
    &JSHint
    Command:
    %systemroot%\system32\cscript.exe
    Arguments:
    //Nologo "%YourJSHintPath%\env\wsh.js" $(ItemPath)
    Initial directory:
    "%YourJSHintPath%\"
    Use Output window
    checked

    JSHint-VSTools-Adding

  4. Open up any *.js file you'd like to validate

  5. Select the all new JSHint from your tools menu:

    JSHint-VSTools-Running

The output that JSHint provides appears to be much more useful than the old JSLint version as well.

Archives Feed your aggregator (RSS 2.0)

<April 2014>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Search

On this page....

Categories

Blogs

Sign In

newtelligence dasBlog 2.2.8279.16125