Skip to content

Commit cbaed7f

Browse files
ianschmitziansu
authored andcommitted
Fix ESLint 6 support (#7513)
* Remove extends restriction to fix ESLint 6 support * Attempt to resolve CI errors
1 parent 4a84cd4 commit cbaed7f

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

docusaurus/docs/setting-up-your-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Note that any rules set to `"error"` will stop the project from building.
4747

4848
There are a few things to remember:
4949

50-
1. You must extend the base config, as removing it could introduce hard-to-find issues.
50+
1. We highly recommend extending the base config, as removing it could introduce hard-to-find issues.
5151
1. When working with TypeScript, you'll need to provide an `overrides` object for rules that should _only_ target TypeScript files.
5252

5353
In the below example:

packages/react-scripts/config/webpack.config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,8 @@ module.exports = function(webpackEnv) {
347347
// A config couldn't be found.
348348
}
349349

350-
// We allow overriding the config, only if it extends our config
351-
// (`extends` can be a string or array of strings).
352-
if (
353-
process.env.EXTEND_ESLINT &&
354-
eslintConfig &&
355-
eslintConfig.extends &&
356-
eslintConfig.extends.includes('react-app')
357-
) {
350+
// We allow overriding the config only if the env variable is set
351+
if (process.env.EXTEND_ESLINT && eslintConfig) {
358352
return eslintConfig;
359353
} else {
360354
return {

0 commit comments

Comments
 (0)