Skip to content

TypeScript 4 support #9515

Closed
Closed
@vikingair

Description

@vikingair

Describe the bug

After updating to typescript@4.0.2 with react-scripts@3.4.1 (I also tried version 3.4.3 where I couldn't find any release notes) the following eslint error occurred:

Parsing error: Cannot read property 'map' of undefined

This happened only after deleting all of my node_modules and recreating the package-lock.json from scratch.

It seems to be related to @typescript-eslint/eslint-plugin. And I don't know why but the referenced versions in react-scripts seems to be very old. From react-scripts@3.4.1 package.json:

 "@typescript-eslint/eslint-plugin": "^2.10.0",
 "@typescript-eslint/parser": "^2.10.0",

Current versions of @typescript-eslint/eslint-plugin and @typescript-eslint/parser are as of now 3.9.1.

  • Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
  • npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions