Tuesday, July 2, 2013

Add/ Install JSCop in Visual Studio and How to Run JSCop in Visual Studio for JS files

JSCop: JSCop is a code analysis tool for java script. We can integrate JSCop in Visual Studio to improve code quality of java script when writing the code in Visual Studio.

Steps to add JSCop in Visual Studio Professional 2012
  • Open Visual Studio
  • Go to Tools -> External Tools (When you click on External Tools a new window will open as shown below)
1
  • Click on 'Add' button
104
  • Below screen will appear
104
  • Fill values as shown in below image and click 'OK'
    • You can enter any name in Title which you want for JSCop, I am writing just JSCop
    • In Command text box write complete path of js50.exe 
    • Arguments:  /file:$(ItemPath)
    • Initial directory: Complete path till bin folder
103
  • JSCop option will now appear in 'Tools' menu
5
How to run JSCop
  • Open JS file (JSCop will run only on JS file i.e. file with extension JS. It will not run on HTML, ASPX, etc.)
  • Select Tools -> JSCop
  • See output window for warnings
  • JSCop option should now be available in ‘Tools’ menu