Remove eslintConfig from package.json #649
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr The
eslintConfig
setting is used to make editor plugins such aslinter
use our ESLint configuration, but at the moment this requires additional packages and configuration to work, and we should not create the project with broken configuration. The configuration can still be added manually.At the moment, when you create an app, the
eslintConfig
setting gets added to package.json. If you have an ESLint package (e.g. linter with linter-eslint) installed in your editor, you'll get a big error:This error is shown every time you save a file, so you're forced to figure out what to do, even if you were just starting out and didn't want to configure the integrations yet.
After a little digging you'll find the instructions for installing the ESLint integration. We instruct the user to install ESLint and all the ESLint plugins globally and to configure the editor plugin to use the global ESLint. This is less than ideal for a few reasons:
I've also seen people trying to edit the
eslintConfig
in package.json in order to use their own ESLint configuration, which doesn't work, which also makes having the configuration there misleading.As we mention in the readme, having to rely on global ESlint will be fixed when ESlint is going to add support for having plugins as dependencies in packages like react-scripts, so we can enable the integration by default at that point. But until this has been fixed, it's better to not add this configuration by default. People can still find the instructions and add it manually when they want it and they're ready to do the plugin setup, but we should not create a configuration that doesn't work out of the box.