Skip to content

Commit 0415189

Browse files
authored
Remove ESLint verification when opting-out (#10499)
1 parent 93241a0 commit 0415189

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/react-scripts/scripts/utils/verifyPackageTree.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const fs = require('fs');
1313
const semver = require('semver');
1414
const 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.
3437
const getSemverRegex = () =>

0 commit comments

Comments
 (0)