@@ -145,10 +145,10 @@ class ExtractTextPlugin {
145
145
extractedChunk . addParent ( extractedChunks [ chunks . indexOf ( c ) ] ) ;
146
146
} ) ;
147
147
} ) ;
148
- async . forEach ( chunks , ( chunk , callback ) => {
148
+ async . forEach ( chunks , ( chunk , callback ) => { // eslint-disable-line no-shadow
149
149
const extractedChunk = extractedChunks [ chunks . indexOf ( chunk ) ] ;
150
150
const shouldExtract = ! ! ( options . allChunks || isInitialOrHasNoParents ( chunk ) ) ;
151
- async . forEach ( chunk . modules . slice ( ) , ( module , callback ) => {
151
+ async . forEach ( chunk . modules . slice ( ) , ( module , callback ) => { // eslint-disable-line no-shadow
152
152
let meta = module [ NS ] ;
153
153
if ( meta && ( ! meta . options . id || meta . options . id === id ) ) {
154
154
const wasExtracted = Array . isArray ( meta . content ) ;
@@ -180,7 +180,7 @@ class ExtractTextPlugin {
180
180
} ) ;
181
181
} , ( err ) => {
182
182
if ( err ) return callback ( err ) ;
183
- extractedChunks . forEach ( function ( extractedChunk ) {
183
+ extractedChunks . forEach ( ( extractedChunk ) => {
184
184
if ( isInitialOrHasNoParents ( extractedChunk ) ) { this . mergeNonInitialChunks ( extractedChunk ) ; }
185
185
} , this ) ;
186
186
extractedChunks . forEach ( ( extractedChunk ) => {
@@ -195,7 +195,7 @@ class ExtractTextPlugin {
195
195
} ) ;
196
196
} ) ;
197
197
compilation . plugin ( 'additional-assets' , ( callback ) => {
198
- extractedChunks . forEach ( function ( extractedChunk ) {
198
+ extractedChunks . forEach ( ( extractedChunk ) => {
199
199
if ( extractedChunk . modules . length ) {
200
200
extractedChunk . modules . sort ( ( a , b ) => {
201
201
if ( ! options . ignoreOrder && isInvalidOrder ( a , b ) ) {
@@ -209,7 +209,7 @@ class ExtractTextPlugin {
209
209
210
210
const getPath = format => compilation . getPath ( format , {
211
211
chunk,
212
- } ) . replace ( / \[ (?: ( \w + ) : ) ? c o n t e n t h a s h (?: : ( [ a - z ] + \d * ) ) ? (?: : ( \d + ) ) ? \] / ig, function ( ) {
212
+ } ) . replace ( / \[ (?: ( \w + ) : ) ? c o n t e n t h a s h (?: : ( [ a - z ] + \d * ) ) ? (?: : ( \d + ) ) ? \] / ig, function ( ) { // eslint-disable-line func-names
213
213
return loaderUtils . getHashDigest ( source . source ( ) , arguments [ 1 ] , arguments [ 2 ] , parseInt ( arguments [ 3 ] , 10 ) ) ;
214
214
} ) ;
215
215
@@ -227,10 +227,10 @@ class ExtractTextPlugin {
227
227
228
228
export default ExtractTextPlugin ;
229
229
230
- ExtractTextPlugin . prototype . mergeNonInitialChunks = function ( chunk , intoChunk , checkedChunks ) {
230
+ ExtractTextPlugin . prototype . mergeNonInitialChunks = function ( chunk , intoChunk , checkedChunks ) { // eslint-disable-line func-names
231
231
if ( ! intoChunk ) {
232
232
checkedChunks = [ ] ;
233
- chunk . chunks . forEach ( function ( c ) {
233
+ chunk . chunks . forEach ( ( c ) => {
234
234
if ( isInitialOrHasNoParents ( c ) ) return ;
235
235
this . mergeNonInitialChunks ( c , chunk , checkedChunks ) ;
236
236
} , this ) ;
@@ -240,16 +240,16 @@ ExtractTextPlugin.prototype.mergeNonInitialChunks = function (chunk, intoChunk,
240
240
intoChunk . addModule ( module ) ;
241
241
module . addChunk ( intoChunk ) ;
242
242
} ) ;
243
- chunk . chunks . forEach ( function ( c ) {
243
+ chunk . chunks . forEach ( ( c ) => {
244
244
if ( isInitialOrHasNoParents ( c ) ) return ;
245
245
this . mergeNonInitialChunks ( c , intoChunk , checkedChunks ) ;
246
246
} , this ) ;
247
247
}
248
248
} ;
249
249
250
- ExtractTextPlugin . prototype . renderExtractedChunk = function ( chunk ) {
250
+ ExtractTextPlugin . prototype . renderExtractedChunk = function ( chunk ) { // eslint-disable-line func-names
251
251
const source = new ConcatSource ( ) ;
252
- chunk . modules . forEach ( function ( module ) {
252
+ chunk . modules . forEach ( ( module ) => {
253
253
const moduleSource = module . source ( ) ;
254
254
source . add ( this . applyAdditionalInformation ( moduleSource , module . additionalInformation ) ) ;
255
255
} , this ) ;
0 commit comments