forked from stackrox/stackrox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js.patch
More file actions
53 lines (53 loc) · 2.17 KB
/
Copy pathwebpack.config.js.patch
File metadata and controls
53 lines (53 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- webpack.config.js 2021-01-14 15:36:20.000000000 -0800
+++ patched-webpack.config.js 2021-01-14 15:42:03.000000000 -0800
@@ -750,25 +750,31 @@
// The formatter is invoked directly in WebpackDevServerUtils during development
formatter: isEnvProduction ? typescriptFormatter : undefined,
}),
- new ESLintPlugin({
- // Plugin options
- extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
- formatter: require.resolve('react-dev-utils/eslintFormatter'),
- eslintPath: require.resolve('eslint'),
- context: paths.appSrc,
- cache: true,
- // ESLint class options
- cwd: paths.appPath,
- resolvePluginsRelativeTo: __dirname,
- baseConfig: {
- extends: [require.resolve('eslint-config-react-app/base')],
- rules: {
- ...(!hasJsxRuntime && {
- 'react/react-in-jsx-scope': 'error',
- }),
- },
- },
- }),
+ // --- BEGIN StackRox Patch ---
+ // We're doing linting independently, and currently react-scripts@4 is extremely slow because of it,
+ // even with `eslint-webpack-plugin@2.4.1`. See https://github.com/facebook/create-react-app/issues/10154.
+ // Therefore removing ESLintPlugin entirely.
+ //
+ // new ESLintPlugin({
+ // // Plugin options
+ // extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
+ // formatter: require.resolve('react-dev-utils/eslintFormatter'),
+ // eslintPath: require.resolve('eslint'),
+ // context: paths.appSrc,
+ // cache: true,
+ // // ESLint class options
+ // cwd: paths.appPath,
+ // resolvePluginsRelativeTo: __dirname,
+ // baseConfig: {
+ // extends: [require.resolve('eslint-config-react-app/base')],
+ // rules: {
+ // ...(!hasJsxRuntime && {
+ // 'react/react-in-jsx-scope': 'error',
+ // }),
+ // },
+ // },
+ // }),
+ // --- END StackRox Patch ---
].filter(Boolean),
// Some libraries import Node modules but don't use them in the browser.
// Tell webpack to provide empty mocks for them so importing them works.