This is part 2 to my last post, which you’ll want to read first since I’m going to assume some of your gruntfile.js has some necessary settings.

 

Using Grunt to JSHint (Code Quality) and jscs (Code Style checker) your JavaScript code.

 

In this post, I'm going to show you how to get Gruntjs to check your JavaScript Code for quality in Visual Studio 2015.

 

Add this to your package.json file.

 

"grunt-jscs": "latest",
"grunt-contrib-jshint": "latest"

 

This will add JSCS and JSHint to your node_modules folder and let us run our tasks.

 

Add

 

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');

 

to gruntfile.js at the bottom with the rest of your loadNpmTasks

 

Read More