From e0006e4c5be954c742c60592aa118c26baa53cc1 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Wed, 19 Mar 2014 20:48:20 +0900 Subject: [PATCH] Check JSON files with gulp-jsonlint. --- gulpfile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 6e0c6460..77523f42 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,10 +1,18 @@ var gulp = require('gulp') var jshint = require('gulp-jshint') +var jsonlint = require('gulp-jsonlint') -gulp.task('lint', function() { +gulp.task('jshint', function() { gulp.src(['lib/**/*.js', '*.js']) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')) }) +gulp.task('jsonlint', function() { + return gulp.src(['.jshintrc', '.bowerrc', '.yo-rc.json', '*.json']) + .pipe(jsonlint()) + .pipe(jsonlint.reporter()) +}) + +gulp.task('lint', ['jshint', 'jsonlint']) gulp.task('test', ['lint'])