@@ -85,23 +85,26 @@ const handleError = (error, file, callback) => {
8585
8686// eslint-disable-next-line arrow-body-style
8787const gulpSass = ( options , sync ) => {
88- // eslint-disable-next-line consistent-return
8988 return transfob ( ( file , encoding , callback ) => {
9089 if ( file . isNull ( ) ) {
91- return callback ( null , file ) ;
90+ callback ( null , file ) ;
91+ return ;
9292 }
9393
9494 if ( file . isStream ( ) ) {
95- return callback ( new PluginError ( PLUGIN_NAME , 'Streaming not supported' ) ) ;
95+ callback ( new PluginError ( PLUGIN_NAME , 'Streaming not supported' ) ) ;
96+ return ;
9697 }
9798
9899 if ( path . basename ( file . path ) . startsWith ( '_' ) ) {
99- return callback ( ) ;
100+ callback ( ) ;
101+ return ;
100102 }
101103
102104 if ( ! file . contents . length ) {
103105 file . path = replaceExtension ( file . path , '.css' ) ;
104- return callback ( null , file ) ;
106+ callback ( null , file ) ;
107+ return ;
105108 }
106109
107110 const opts = clonedeep ( options || { } ) ;
@@ -137,10 +140,10 @@ const gulpSass = (options, sync) => {
137140 /**
138141 * Async Sass render
139142 */
140- // eslint-disable-next-line consistent-return
141143 gulpSass . compiler . render ( opts , ( error , obj ) => {
142144 if ( error ) {
143- return handleError ( error , file , callback ) ;
145+ handleError ( error , file , callback ) ;
146+ return ;
144147 }
145148
146149 filePush ( file , obj , callback ) ;
@@ -152,7 +155,7 @@ const gulpSass = (options, sync) => {
152155 try {
153156 filePush ( file , gulpSass . compiler . renderSync ( opts ) , callback ) ;
154157 } catch ( error ) {
155- return handleError ( error , file , callback ) ;
158+ handleError ( error , file , callback ) ;
156159 }
157160 }
158161 } ) ;
0 commit comments