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: eslintrc overrides key should be an array, not object #7219

Merged
merged 1 commit into from
Jun 14, 2019

Conversation

ivan-aksamentov
Copy link
Contributor

@ivan-aksamentov ivan-aksamentov commented Jun 14, 2019

Attempts to fix #7218

Array format for overrides key in eslint config file is now enforced to be an array in ESLint v6. Anyone who uses eslint-config-react-app and ESLint v6 gets a type mismatch error:

Error: ESLint configuration in .eslintrc.js » eslint-config-react-app is invalid:
  - Property "overrides" is the wrong type (expected array but got `{"files":["**/*.ts","**/*.tsx"],"parser":"@typescript-eslint/parser","parserOptions":{"ecmaVersion":2018,"sourceType":"module","ecmaFeatures":{"jsx":true},"warnOnUnsupportedTypeScriptVersion":true},"plugins":["@typescript-eslint"],"rules":{"default-case":"off","no-dupe-class-members":"off","@typescript-eslint/no-angle-bracket-type-assertion":"warn","no-array-constructor":"off","@typescript-eslint/no-array-constructor":"warn","@typescript-eslint/no-namespace":"error","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["warn",{"args":"none","ignoreRestSiblings":true}],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"warn"}}`).

This commit fixes the error by converting the object into a one-element array containing that object. Only 3 characters are added: [, ] and ,. The large diff is due to formatting.

Array format for `overrides` key in eslint config file is now enforced in ESLint v6. Anyone who uses `eslint-config-react-app` and ESLint v6 gets a type mismatch error. This commit fixes the error by converting the object into a one-element array containing this object.
Only 2 characters are added: `[` and `]`. The large diff is due to formatting.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ianschmitz ianschmitz added this to the 3.0.2 milestone Jun 14, 2019
@ianschmitz ianschmitz merged commit 24489ac into facebook:master Jun 14, 2019
@ianschmitz
Copy link
Contributor

Thanks @ivan-aksamentov!

jadurani pushed a commit to TuringEnterprises/create-react-app that referenced this pull request Jun 15, 2019
…book#7219)

Array format for `overrides` key in eslint config file is now enforced in ESLint v6. Anyone who uses `eslint-config-react-app` and ESLint v6 gets a type mismatch error. This commit fixes the error by converting the object into a one-element array containing this object.
Only 2 characters are added: `[` and `]`. The large diff is due to formatting.
GeekOnCoffee pushed a commit to headwayio/create-react-app that referenced this pull request Jun 17, 2019
…book#7219)

Array format for `overrides` key in eslint config file is now enforced in ESLint v6. Anyone who uses `eslint-config-react-app` and ESLint v6 gets a type mismatch error. This commit fixes the error by converting the object into a one-element array containing this object.
Only 2 characters are added: `[` and `]`. The large diff is due to formatting.
@lock lock bot locked and limited conversation to collaborators Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eslint-config-react-app fails with ESLint v6
3 participants