From: gustavo Date: Sun, 15 Nov 2015 22:46:43 +0000 (+0100) Subject: gulp-my-tasks: jscs rules and gulp plugin X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=261fe5cf4c927459a148dee85d827c229d8a6733;p=JavaScriptForFun gulp-my-tasks: jscs rules and gulp plugin --- diff --git a/gulp/gulp-my-tasks/package.json b/gulp/gulp-my-tasks/package.json index e76424a..3aabd62 100644 --- a/gulp/gulp-my-tasks/package.json +++ b/gulp/gulp-my-tasks/package.json @@ -25,6 +25,7 @@ "gulp-if": "~2.0.0", "gulp-inject": "~3.0.0", "gulp-jscs": "~3.0.2", + "gulp-jscs-stylish" : "~1.2.1", "gulp-jshint": "~1.12.0", "gulp-load-plugins": "~1.1.0", "gulp-minify-css": "~1.2.1", diff --git a/gulp/gulp-my-tasks/tasks/.jscsrc b/gulp/gulp-my-tasks/tasks/.jscsrc index be714a3..96b02d5 100644 --- a/gulp/gulp-my-tasks/tasks/.jscsrc +++ b/gulp/gulp-my-tasks/tasks/.jscsrc @@ -69,12 +69,12 @@ "disallowMultipleLineBreaks": true, - "disallowCommaBeforeLineBreak": null, - "disallowDanglingUnderscores": null, - "disallowEmptyBlocks": null, - "disallowTrailingComma": null, - "requireCommaBeforeLineBreak": null, - "requireDotNotation": null, - "requireMultipleVarDecl": null, + "disallowCommaBeforeLineBreak": false, + "disallowDanglingUnderscores": false, + "disallowEmptyBlocks": true, + "disallowTrailingComma": true, + "requireCommaBeforeLineBreak": true, + "requireDotNotation": true, + "requireMultipleVarDecl": false, "requireParenthesesAroundIIFE": true } diff --git a/gulp/gulp-my-tasks/tasks/tasks.js b/gulp/gulp-my-tasks/tasks/tasks.js index 82a99d8..cafeb80 100644 --- a/gulp/gulp-my-tasks/tasks/tasks.js +++ b/gulp/gulp-my-tasks/tasks/tasks.js @@ -56,12 +56,13 @@ module.exports = function(gulp, customConfig) { return "vet-js: " + filepath; }))) .pipe(plugins.jshint(config.jsHintConfigurationFile)) - .pipe(plugins.jshint.reporter('jshint-stylish', {verbose: true})) - .pipe(plugins.jshint.reporter('fail')) .pipe(plugins.jscs({ configPath: config.jscsConfigurationFile, fix: false - })); + })) + .pipe(plugins.jscsStylish.combineWithHintResults()) + .pipe(plugins.jshint.reporter('jshint-stylish', {verbose: true})) + .pipe(plugins.jshint.reporter('fail')); }); /**