File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/react-scripts/scripts/utils Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ const fs = require('fs');
1313const semver = require ( 'semver' ) ;
1414const path = require ( 'path' ) ;
1515
16+ const isESLintPluginEnabled = process . env . DISABLE_ESLINT_PLUGIN !== 'true' ;
17+
1618// We assume that having wrong versions of these
1719// in the tree will likely break your setup.
1820// This is a relatively low-effort way to find common issues.
@@ -21,14 +23,15 @@ function verifyPackageTree(){
2123// These are packages most likely to break in practice.
2224// See https://github.com/facebook/create-react-app/issues/1795 for reasons why.
2325// I have not included Babel here because plugins typically don't import Babel (so it's not affected).
24- 'babel-eslint' ,
2526'babel-jest' ,
2627'babel-loader' ,
27- 'eslint' ,
2828'jest' ,
2929'webpack' ,
3030'webpack-dev-server' ,
31- ] ;
31+ isESLintPluginEnabled && 'babel-eslint' ,
32+ isESLintPluginEnabled && 'eslint' ,
33+ ] . filter ( Boolean ) ;
34+
3235// Inlined from semver-regex, MIT license.
3336// Don't want to make this a dependency after ejecting.
3437const getSemverRegex = ( ) =>
You can’t perform that action at this time.
0 commit comments