Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ESLint 6 support #7513

Merged
merged 2 commits into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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