File tree 1 file changed +3
-6
lines changed
packages/react-scripts/scripts/utils
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const isESLintPluginEnabled = process.env.DISABLE_ESLINT_PLUGIN !== 'true';
19
19
// in the tree will likely break your setup.
20
20
// This is a relatively low-effort way to find common issues.
21
21
function verifyPackageTree ( ) {
22
- let depsToCheck = [
22
+ const depsToCheck = [
23
23
// These are packages most likely to break in practice.
24
24
// See https://github.com/facebook/create-react-app/issues/1795 for reasons why.
25
25
// I have not included Babel here because plugins typically don't import Babel (so it's not affected).
@@ -28,11 +28,8 @@ function verifyPackageTree() {
28
28
'jest' ,
29
29
'webpack' ,
30
30
'webpack-dev-server' ,
31
- ] ;
32
-
33
- if ( isESLintPluginEnabled ) {
34
- depsToCheck = [ ...depsToCheck , 'babel-eslint' , 'eslint' ] ;
35
- }
31
+ ...( isESLintPluginEnabled && [ 'babel-eslint' , 'eslint' ] ) ,
32
+ ] . filter ( Boolean ) ;
36
33
37
34
// Inlined from semver-regex, MIT license.
38
35
// Don't want to make this a dependency after ejecting.
You can’t perform that action at this time.
0 commit comments