mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Check JSON files with gulp-jsonlint.
This commit is contained in:
parent
b4416b5f0f
commit
e0006e4c5b
1 changed files with 9 additions and 1 deletions
10
gulpfile.js
10
gulpfile.js
|
@ -1,10 +1,18 @@
|
||||||
var gulp = require('gulp')
|
var gulp = require('gulp')
|
||||||
var jshint = require('gulp-jshint')
|
var jshint = require('gulp-jshint')
|
||||||
|
var jsonlint = require('gulp-jsonlint')
|
||||||
|
|
||||||
gulp.task('lint', function() {
|
gulp.task('jshint', function() {
|
||||||
gulp.src(['lib/**/*.js', '*.js'])
|
gulp.src(['lib/**/*.js', '*.js'])
|
||||||
.pipe(jshint())
|
.pipe(jshint())
|
||||||
.pipe(jshint.reporter('jshint-stylish'))
|
.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'])
|
gulp.task('test', ['lint'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue