Travis's lame ol' blog

yay, Travis finally changed his blog!

- Monday, August 31, 2009

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

Update: 2011-05-13: JSLint WSH no longer available, see JSHint WSH.


Ever wish that Visual Studio had a JSLint add-in? Inspired by a reply to my tweet, I discovered the following solution.

  1. Grab the WSH version of JSLint.

  2. Add this jslint.bat file to the same folder you have JSLint in:

    @echo off
    cscript jslint.js //Nologo < %1
    echo.
    echo Done.
  3. In Visual Studio → Tools → External Tools…

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

    Title:
    &JSLint
    Command:
    %YourJSLintPath%\jslint.bat
    Arguments:
    $(ItemPath)
    Initial directory:
    %YourJSLintPath%\
    Use Output window
    checked

    VS: External Tools

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

  6. Select the all new JSLint from your tools menu:

    VS: Tools Menu

  7. Try not to let JSLint hurt your feelings too much:

    VS: Output From JSLint

In short, JSLint is awesome.

Comments are closed.

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