Skip to content

Commit

Permalink
chore: add jscs gulp task
Browse files Browse the repository at this point in the history
  • Loading branch information
the-darc committed Apr 1, 2016
1 parent 430222e commit dcb42ec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .jscsrc
@@ -0,0 +1,4 @@
{
"preset": "google",
"validateIndentation": 4
}
3 changes: 1 addition & 2 deletions .jshintrc
Expand Up @@ -34,7 +34,6 @@
"it"
],
"indent": 4,
"maxlen": 120,
"devel": false,
"noempty": true
}
}
7 changes: 7 additions & 0 deletions gulpfile.js
@@ -1,6 +1,7 @@
var path = require('path'),
gulp = require('gulp'),
jshint = require('gulp-jshint'),
jscs = require('gulp-jscs'),
jshintReporter = require('jshint-stylish'),
plugins = require('gulp-load-plugins')({
config: path.join(__dirname, 'package.json')
Expand All @@ -21,6 +22,12 @@ gulp.task('jshint', function() {
.pipe(jshint.reporter(jshintReporter));
});

gulp.task('jscs', function() {
gulp.src(config.src.files)
.pipe(jscs({fix: true}))
.pipe(gulp.dest('src'));
});

function mochaRunnerFactory(reporter) {
return plugins.mocha({
reporter: reporter || config.reporter
Expand Down

0 comments on commit dcb42ec

Please sign in to comment.