forked from karimsa/gulp-jslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
executable file
·47 lines (40 loc) · 1.26 KB
/
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
38
39
40
41
42
43
44
45
46
47
/**
* Gulpfile.js
* For build instructions, please see README.md.
*
* Copyright (C) 2014 KarimSa Networks.
**/
(function () {
"use strict";
var gulp = require('gulp'),
jslint = require('./gulp.jslint.js');
// lint all code
gulp.task('default', function () {
return gulp.src(['Gulpfile.js', 'gulp.jslint.js'])
// pass your directives
// as an object
.pipe(jslint({
// these directives can
// be found in the official
// JSLint documentation.
node: true,
nomen: true,
// pass in your prefered
// reporter like so:
reporter: 'default',
// specify whether or not
// to show 'PASS' messages
// for built-in reporter
errorsOnly: false
}))
// error handling:
// to handle on error, simply
// bind yourself to the error event
// of the stream, and use the only
// argument as the error object
// (error instanceof Error)
.on('error', function (error) {
console.error(String(error));
});
});
}());