forked from rogeriopvl/gulp-jsonlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
37 lines (32 loc) · 880 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var gulp = require('gulp')
var jsonlint = require('.')
gulp.task('valid', function() {
return gulp.src('./test/fixtures/valid.json')
.pipe(jsonlint())
})
gulp.task('one', function() {
return gulp.src('./test/fixtures/invalid.json')
.pipe(jsonlint())
.pipe(jsonlint.failOnError())
})
gulp.task('two', function() {
return gulp.src('./test/fixtures/comments.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter())
.pipe(jsonlint.failAfterError())
})
gulp.task('three', function() {
return gulp.src('./test/fixtures/json5.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter({}))
.pipe(jsonlint.failAfterError())
})
gulp.task('all', function() {
return gulp.src('./test/fixtures/*.json')
.pipe(jsonlint())
.pipe(jsonlint.reporter({
formatter: 'msbuild',
reporter: 'jshint'
}))
.pipe(jsonlint.failAfterError())
})