1
1
'use strict' ;
2
- var gutil = require ( 'gulp-util ' ) ;
2
+ var PluginError = require ( 'plugin-error ' ) ;
3
3
var through = require ( 'through2' ) ;
4
4
var stylint = require ( 'stylint' ) ;
5
5
@@ -10,7 +10,7 @@ var failReporter = function (options) {
10
10
11
11
return through . obj ( function ( file , enc , cb ) {
12
12
if ( file . stylint && ( file . stylint . errors || ( failOnWarning && file . stylint . warnings ) ) ) {
13
- return cb ( new gutil . PluginError ( 'gulp-stylint' , 'Stylint failed for ' + file . relative ) , file ) ;
13
+ return cb ( new PluginError ( 'gulp-stylint' , 'Stylint failed for ' + file . relative ) , file ) ;
14
14
}
15
15
16
16
this . push ( file ) ;
@@ -42,7 +42,7 @@ module.exports = function (options) {
42
42
}
43
43
44
44
if ( file . isStream ( ) ) {
45
- return cb ( gutil . PluginError ( 'gulp-stylint' , 'Streaming not supported' ) , file ) ;
45
+ return cb ( new PluginError ( 'gulp-stylint' , 'Streaming not supported' ) , file ) ;
46
46
}
47
47
48
48
stylint ( file . path , rules )
@@ -87,7 +87,7 @@ module.exports.reporter = function (reporter, options) {
87
87
return failReporter ( options ) ;
88
88
}
89
89
90
- throw new gutil . PluginError ( 'gulp-stylint' , reporter + ' is not a reporter' ) ;
90
+ throw new PluginError ( 'gulp-stylint' , reporter + ' is not a reporter' ) ;
91
91
}
92
92
93
93
var logger = ( reporter || { } ) . logger || console . log ;
0 commit comments