Search code examples
create-react-appeslinttypescript-eslint

Parsing error: '=' expected in `import type`


I am using create-react-app with TS and do import type but eslint complains in VS Code saying that Parsing error: '=' expected when hovering type in import type. I'm using eslint, 6.7.2


Solution

  • UPDATE: The syntax is now supported by the latest versions of @typescript-eslint/parser and @typescript-eslint/eslint-plugin.


    ESLint support for TS import type syntax is working in progress.

    Issue: https://github.com/typescript-eslint/typescript-eslint/issues/1436

    Pull request: https://github.com/typescript-eslint/typescript-eslint/pull/1465