@@ -43,12 +43,12 @@ const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
43
43
44
44
const reactRefreshRuntimeEntry = require . resolve ( 'react-refresh/runtime' ) ;
45
45
const reactRefreshWebpackPluginRuntimeEntry = require . resolve (
46
- '@pmmmwh/react-refresh-webpack-plugin'
46
+ '@pmmmwh/react-refresh-webpack-plugin' ,
47
47
) ;
48
48
const babelRuntimeEntry = require . resolve ( 'babel-preset-react-app' ) ;
49
49
const babelRuntimeEntryHelpers = require . resolve (
50
50
'@babel/runtime/helpers/esm/assertThisInitialized' ,
51
- { paths : [ babelRuntimeEntry ] }
51
+ { paths : [ babelRuntimeEntry ] } ,
52
52
) ;
53
53
const babelRuntimeRegenerator = require . resolve ( '@babel/runtime/regenerator' , {
54
54
paths : [ babelRuntimeEntry ] ,
@@ -62,15 +62,15 @@ const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === 'true';
62
62
const disableESLintPlugin = process . env . DISABLE_ESLINT_PLUGIN === 'true' ;
63
63
64
64
const imageInlineSizeLimit = parseInt (
65
- process . env . IMAGE_INLINE_SIZE_LIMIT || '10000'
65
+ process . env . IMAGE_INLINE_SIZE_LIMIT || '10000' ,
66
66
) ;
67
67
68
68
// Check if TypeScript is setup
69
69
const useTypeScript = fs . existsSync ( paths . appTsConfig ) ;
70
70
71
71
// Check if Tailwind config exists
72
72
const useTailwind = fs . existsSync (
73
- path . join ( paths . appPath , 'tailwind.config.js' )
73
+ path . join ( paths . appPath , 'tailwind.config.js' ) ,
74
74
) ;
75
75
76
76
// Get the path to the uncompiled service worker (if it exists).
@@ -190,7 +190,7 @@ module.exports = function (webpackEnv) {
190
190
options : {
191
191
sourceMap : true ,
192
192
} ,
193
- }
193
+ } ,
194
194
) ;
195
195
}
196
196
return loaders ;
@@ -232,12 +232,13 @@ module.exports = function (webpackEnv) {
232
232
publicPath : paths . publicUrlOrPath ,
233
233
// Point sourcemap entries to original disk location (format as URL on Windows)
234
234
devtoolModuleFilenameTemplate : isEnvProduction
235
- ? info =>
235
+ ? ( info ) =>
236
236
path
237
237
. relative ( paths . appSrc , info . absoluteResourcePath )
238
238
. replace ( / \\ / g, '/' )
239
239
: isEnvDevelopment &&
240
- ( info => path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
240
+ ( ( info ) =>
241
+ path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
241
242
} ,
242
243
cache : {
243
244
type : 'filesystem' ,
@@ -247,8 +248,8 @@ module.exports = function (webpackEnv) {
247
248
buildDependencies : {
248
249
defaultWebpack : [ 'webpack/lib/' ] ,
249
250
config : [ __filename ] ,
250
- tsconfig : [ paths . appTsConfig , paths . appJsConfig ] . filter ( f =>
251
- fs . existsSync ( f )
251
+ tsconfig : [ paths . appTsConfig , paths . appJsConfig ] . filter ( ( f ) =>
252
+ fs . existsSync ( f ) ,
252
253
) ,
253
254
} ,
254
255
} ,
@@ -308,7 +309,7 @@ module.exports = function (webpackEnv) {
308
309
// if there are any conflicts. This matches Node resolution mechanism.
309
310
// https://github.com/facebook/create-react-app/issues/253
310
311
modules : [ 'node_modules' , paths . appNodeModules ] . concat (
311
- modules . additionalModulePaths || [ ]
312
+ modules . additionalModulePaths || [ ] ,
312
313
) ,
313
314
// These are the reasonable defaults supported by the Node ecosystem.
314
315
// We also include JSX as a common component filename extension to support
@@ -317,8 +318,8 @@ module.exports = function (webpackEnv) {
317
318
// `web` extension prefixes have been added for better support
318
319
// for React Native Web.
319
320
extensions : paths . moduleFileExtensions
320
- . map ( ext => `.${ ext } ` )
321
- . filter ( ext => useTypeScript || ! ext . includes ( 'ts' ) ) ,
321
+ . map ( ( ext ) => `.${ ext } ` )
322
+ . filter ( ( ext ) => useTypeScript || ! ext . includes ( 'ts' ) ) ,
322
323
alias : {
323
324
// Support React Native Web
324
325
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
@@ -419,7 +420,7 @@ module.exports = function (webpackEnv) {
419
420
loader : require . resolve ( 'babel-loader' ) ,
420
421
options : {
421
422
customize : require . resolve (
422
- 'babel-preset-react-app/webpack-overrides'
423
+ 'babel-preset-react-app/webpack-overrides' ,
423
424
) ,
424
425
presets : [
425
426
[
@@ -446,7 +447,7 @@ module.exports = function (webpackEnv) {
446
447
'babel-preset-react-app' ,
447
448
'react-dev-utils' ,
448
449
'react-scripts' ,
449
- ]
450
+ ] ,
450
451
) ,
451
452
// @remove -on-eject-end
452
453
plugins : [
@@ -492,7 +493,7 @@ module.exports = function (webpackEnv) {
492
493
'babel-preset-react-app' ,
493
494
'react-dev-utils' ,
494
495
'react-scripts' ,
495
- ]
496
+ ] ,
496
497
) ,
497
498
// @remove -on-eject-end
498
499
// Babel sourcemaps are needed for debugging into node_modules
@@ -558,7 +559,7 @@ module.exports = function (webpackEnv) {
558
559
mode : 'icss' ,
559
560
} ,
560
561
} ,
561
- 'sass-loader'
562
+ 'sass-loader' ,
562
563
) ,
563
564
// Don't consider CSS imports dead code even if the
564
565
// containing package claims to have no side effects.
@@ -581,7 +582,7 @@ module.exports = function (webpackEnv) {
581
582
getLocalIdent : getCSSModuleLocalIdent ,
582
583
} ,
583
584
} ,
584
- 'sass-loader'
585
+ 'sass-loader' ,
585
586
) ,
586
587
} ,
587
588
// "file" loader makes sure those assets get served by WebpackDevServer.
@@ -627,8 +628,8 @@ module.exports = function (webpackEnv) {
627
628
minifyURLs : true ,
628
629
} ,
629
630
}
630
- : undefined
631
- )
631
+ : undefined ,
632
+ ) ,
632
633
) ,
633
634
// Inlines the webpack runtime script. This script is too small to warrant
634
635
// a network request.
@@ -684,7 +685,7 @@ module.exports = function (webpackEnv) {
684
685
return manifest ;
685
686
} , seed ) ;
686
687
const entrypointFiles = entrypoints . main . filter (
687
- fileName => ! fileName . endsWith ( '.map' )
688
+ ( fileName ) => ! fileName . endsWith ( '.map' ) ,
688
689
) ;
689
690
690
691
return {
@@ -763,31 +764,6 @@ module.exports = function (webpackEnv) {
763
764
infrastructure : 'silent' ,
764
765
} ,
765
766
} ) ,
766
- ! disableESLintPlugin &&
767
- new ESLintPlugin ( {
768
- // Plugin options
769
- extensions : [ 'js' , 'mjs' , 'jsx' , 'ts' , 'tsx' ] ,
770
- formatter : require . resolve ( 'react-dev-utils/eslintFormatter' ) ,
771
- eslintPath : require . resolve ( 'eslint' ) ,
772
- failOnError : ! ( isEnvDevelopment && emitErrorsAsWarnings ) ,
773
- context : paths . appSrc ,
774
- cache : true ,
775
- cacheLocation : path . resolve (
776
- paths . appNodeModules ,
777
- '.cache/.eslintcache'
778
- ) ,
779
- // ESLint class options
780
- cwd : paths . appPath ,
781
- resolvePluginsRelativeTo : __dirname ,
782
- baseConfig : {
783
- extends : [ require . resolve ( 'eslint-config-react-app/base' ) ] ,
784
- rules : {
785
- ...( ! hasJsxRuntime && {
786
- 'react/react-in-jsx-scope' : 'error' ,
787
- } ) ,
788
- } ,
789
- } ,
790
- } ) ,
791
767
] . filter ( Boolean ) ,
792
768
// Turn off performance processing because we utilize
793
769
// our own hints via the FileSizeReporter
0 commit comments