From 261fe5cf4c927459a148dee85d827c229d8a6733 Mon Sep 17 00:00:00 2001 From: gustavo Date: Sun, 15 Nov 2015 23:46:43 +0100 Subject: [PATCH] gulp-my-tasks: jscs rules and gulp plugin --- gulp/gulp-my-tasks/package.json | 1 + gulp/gulp-my-tasks/tasks/.jscsrc | 14 +++++++------- gulp/gulp-my-tasks/tasks/tasks.js | 7 ++++--- 3 files changed, 12 insertions(+), 10 deletions(-) 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')); }); /** -- 2.1.4