Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #7218
Closed
Open
Issue created Jun 14, 2019 by Administrator@rootContributor

eslint-config-react-app fails with ESLint v6

Created by: ivan-aksamentov

TLDR:

overrides option in eslint-config-react-app has incorrect type (object, not array). Eslint v6 (it implements stricter config type checks) now fails in any project that uses eslint-config-react-app.

PR #7219

Please note that this issue affects users beyond create-react-app, because many projects use eslint-config-react-app as a starting points for their eslint configurations. These users are unable to try Eslint 6 until this is sorted out.

Is this a bug report?

yes

Did you try recovering your dependencies?

yes

Which terms did you search for in User Guide?

none

Environment

Environment Info:

  System:
    OS: Linux 4.18 Ubuntu 18.04.2 LTS (Bionic Beaver)
    CPU: Not Found
  Binaries:
    Node: 12.4.0 - ~/.nvm/versions/node/default/bin/node
    Yarn: 1.16.0 - ~/.nvm/versions/node/default/bin/yarn
    npm: 6.9.0 - ~/.nvm/versions/node/default/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce

(Write your steps here:)

  1. In a project that uses eslint-config-react-app, upgrade eslint to version 6 (e.g. 6.0.0-rc.0)
  2. Run eslint
  3. Receive an error

Expected Behavior

No errors

Actual Behavior

eslint fails with an 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"}}`).

Reproducible Demo

git clone https://github.com/facebook/create-react-app
cd create-react-app
yarn install
npx ncu --upgrade --newest eslint
yarn install
eslint .
Assignee
Assign to
Time tracking