@@ -85,23 +85,26 @@ const handleError = (error, file, callback) => {
85
85
86
86
// eslint-disable-next-line arrow-body-style
87
87
const gulpSass = ( options , sync ) => {
88
- // eslint-disable-next-line consistent-return
89
88
return transfob ( ( file , encoding , callback ) => {
90
89
if ( file . isNull ( ) ) {
91
- return callback ( null , file ) ;
90
+ callback ( null , file ) ;
91
+ return ;
92
92
}
93
93
94
94
if ( file . isStream ( ) ) {
95
- return callback ( new PluginError ( PLUGIN_NAME , 'Streaming not supported' ) ) ;
95
+ callback ( new PluginError ( PLUGIN_NAME , 'Streaming not supported' ) ) ;
96
+ return ;
96
97
}
97
98
98
99
if ( path . basename ( file . path ) . startsWith ( '_' ) ) {
99
- return callback ( ) ;
100
+ callback ( ) ;
101
+ return ;
100
102
}
101
103
102
104
if ( ! file . contents . length ) {
103
105
file . path = replaceExtension ( file . path , '.css' ) ;
104
- return callback ( null , file ) ;
106
+ callback ( null , file ) ;
107
+ return ;
105
108
}
106
109
107
110
const opts = clonedeep ( options || { } ) ;
@@ -137,10 +140,10 @@ const gulpSass = (options, sync) => {
137
140
/**
138
141
* Async Sass render
139
142
*/
140
- // eslint-disable-next-line consistent-return
141
143
gulpSass . compiler . render ( opts , ( error , obj ) => {
142
144
if ( error ) {
143
- return handleError ( error , file , callback ) ;
145
+ handleError ( error , file , callback ) ;
146
+ return ;
144
147
}
145
148
146
149
filePush ( file , obj , callback ) ;
@@ -152,7 +155,7 @@ const gulpSass = (options, sync) => {
152
155
try {
153
156
filePush ( file , gulpSass . compiler . renderSync ( opts ) , callback ) ;
154
157
} catch ( error ) {
155
- return handleError ( error , file , callback ) ;
158
+ handleError ( error , file , callback ) ;
156
159
}
157
160
}
158
161
} ) ;
0 commit comments