react typescript eslint plugin - 文件的扩展名 (.svg) 是非标准的

Tuz*_*Tuz 4 typescript eslint

我对打字稿做出了反应。

我正在尝试向我的项目添加一些 eslint,但在 yarn lint 期间出现此错误

(eslint src/** --ext .ts,.tsx")

我也在 css 上遇到了一些错误

  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: src/logo.svg.
The extension for the file (.svg) is non-standard. You should add "parserOptions.extraFileExtensions" to your config
Run Code Online (Sandbox Code Playgroud)

.css 也一样

我的 eslint 基于这篇文章 https://gist.github.com/1natsu172/a65a4b45faed2bd3fa74b24163e4256e

mts*_*tsz 5

使用eslint src --ext .ts,.tsx为我修复了它。

有关更多背景信息,请参阅/sf/answers/3061956481/