fix(eslint-config): don't use .eslintrc and set parser settings #29109
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.
Description
#28911 introduced some problems in case user has their own
.eslintrcspecifically when usingeslintthat is incompatible with version used currently by gatsby (we use^6now,^7is latest).This change disallow using
.eslintrcfor minimal required config for fast-refresh rules ( 1.). But this is not sufficent change. after dissalowing the use of it, we end up with:So
parserOptionswere added (2.) to handle that part are pretty much copy&paste from https://github.com/facebook/create-react-app/blob/0f6fc2bc71d78f0dcae67f3f08ce98a42fc0a57c/packages/eslint-config-react-app/base.js#L29-L35 which we use for our default eslint-loader setting (for cases where.eslintrcdoesn't exist and we provide some generic set of rules).Related Issues
Fixes #29105