Installing and Using JSLint for Visual Studio 2010

Just like JSLint.VS this is also a Java Script code analysis tool. This tool is an add-in for Visual Studio 2010. This is also developed by an individual programmer. This tool is like JSLint.VS, but has more features and options than the JSLint.VS. In this article I’ll list down some of the useful features of this code analyzer tool and the steps for Installing and Using JSLint

Features:

  • Choice of JSlint (current), JSLint (old) and JSHint.
  • Supports JQuery.
  • Similar to JSLint.VS, but has more features and options.
  • Configure from the Tools menu. Screenshot
  • Analyze JavaScript on Save.
  • Analyze all JavaScript files when building the project or solution
  • Also supports analyzing HTML files containing JavaScript.
  • Analyze selected JavaScript files from the Solution Explorer.
  • Analyze a selected JavaScript snippet or the complete file while in the Code Editor window. Screenshot
  • Output as Errors, Warnings, Messages or Tasks.
  • CSS validation.
  • Detection of constants (optional)

Installing JSLint for VS2010:

  1. Download the “vsix” file from http://jslint4vs2010.codeplex.com/.
  2. Double click the “vsix” file and follow the instructions.

Using JSLint for VS 2010:

  1. JSLint-for-VS2010 options screen can be launched from the Visual Studio tools menu.
    Installing and Using JSLint For Visual Studio 2010 - 1
  2. In the visual studio options tab, we can set the options like output as errors or warnings or tasks. Whether to run the tool during build or not. Whether to run the tool on save. Whether to validate css files and html files or not.
  3. The JSLint-Options tab provides option to choose JS lint or JS Hint as validation tool.
  4. We can select a set of Java script code or file, right-click and select the JS Lint to run the tool for the selected lines of code.
    Installing and Using JSLint For Visual Studio 2010 - 2
  5. We can even apply strict white space indention and Maximum line length. But for panther we can ignore them.

Related Articles

 

Leave your thoughts...