18

我正在create-react-app与 TS 一起使用,import type但 eslint 在 VS Code 中抱怨说,Parsing error: '=' expected当悬停typeimport type. 我正在使用 eslint,6.7.2

4

1 回答 1

19

更新@typescript-eslint/parser:和的最新版本现在支持该语法@typescript-eslint/eslint-plugin


对 TS 语法的 ESLint 支持import type正在进行中。

问题:https ://github.com/typescript-eslint/typescript-eslint/issues/1436

拉取请求:https ://github.com/typescript-eslint/typescript-eslint/pull/1465

于 2020-02-29T11:12:59.010 回答