From cbaed7f9fff2fc570f4f206aa057253bd4f74c9e Mon Sep 17 00:00:00 2001 From: Ian Schmitz Date: Tue, 13 Aug 2019 10:24:29 -0700 Subject: [PATCH] Fix ESLint 6 support (#7513) * Remove extends restriction to fix ESLint 6 support * Attempt to resolve CI errors --- docusaurus/docs/setting-up-your-editor.md | 2 +- packages/react-scripts/config/webpack.config.js | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docusaurus/docs/setting-up-your-editor.md b/docusaurus/docs/setting-up-your-editor.md index 844b9bc5da2..b2d0b51cca6 100644 --- a/docusaurus/docs/setting-up-your-editor.md +++ b/docusaurus/docs/setting-up-your-editor.md @@ -47,7 +47,7 @@ Note that any rules set to `"error"` will stop the project from building. There are a few things to remember: -1. You must extend the base config, as removing it could introduce hard-to-find issues. +1. We highly recommend extending the base config, as removing it could introduce hard-to-find issues. 1. When working with TypeScript, you'll need to provide an `overrides` object for rules that should _only_ target TypeScript files. In the below example: diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index dad50a319d4..12157a390b8 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -347,14 +347,8 @@ module.exports = function(webpackEnv) { // A config couldn't be found. } - // We allow overriding the config, only if it extends our config - // (`extends` can be a string or array of strings). - if ( - process.env.EXTEND_ESLINT && - eslintConfig && - eslintConfig.extends && - eslintConfig.extends.includes('react-app') - ) { + // We allow overriding the config only if the env variable is set + if (process.env.EXTEND_ESLINT && eslintConfig) { return eslintConfig; } else { return {