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=4c91368ffc7b6fa0fb2df3984e3d84552e31849b;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..7eb648e 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: args.verbose ? true : false})) + .pipe(plugins.jshint.reporter('fail')); }); /**