grunt-jscs-checker
Advanced tools
Comparing version 0.1.7 to 0.2.0
{ | ||
"name": "grunt-jscs-checker", | ||
"description": "Grunt task for checking JavaScript Code Style with jscs.", | ||
"version": "0.1.7", | ||
"version": "0.2.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Gustavo Henke", |
@@ -6,3 +6,3 @@ module.exports = function( grunt ) { | ||
var path = require( "path" ); | ||
var jscs = new (require( "jscs/lib/checker" ))(); | ||
var Checker = require( "jscs/lib/checker" ); | ||
var defaults = { | ||
@@ -14,2 +14,3 @@ config: ".jscs.json" | ||
var errorCount, i; | ||
var jscs = new Checker(); | ||
var options = this.options( defaults ); | ||
@@ -36,2 +37,7 @@ var cfgPath = options.config; | ||
files.map( jscs.checkFile, jscs ).forEach(function( promise ) { | ||
if ( !promise ) { | ||
i++; | ||
return; | ||
} | ||
promise.then(function( errors ) { | ||
@@ -38,0 +44,0 @@ i++; |
6902
97