Skip to content

Commit

Permalink
Fix ESLint 6 support (#7513)
Browse files Browse the repository at this point in the history
* Remove extends restriction to fix ESLint 6 support

* Attempt to resolve CI errors
  • Loading branch information
ianschmitz authored and iansu committed Aug 13, 2019
1 parent 4a84cd4 commit cbaed7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docusaurus/docs/setting-up-your-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 2 additions & 8 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cbaed7f

Please sign in to comment.