[英]react typescript eslint plugin - The extension for the file (.svg) is non-standard
I have react with typescript.我对打字稿做出了反应。
I am trying to add some eslint to my project and I got this error during yarn lint我正在尝试向我的项目添加一些 eslint,但在 yarn lint 期间出现此错误
(eslint src/** --ext .ts,.tsx")
I also get some error on css我也在 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
the same for .css .css 也一样
my eslint based onthis post https://gist.github.com/1natsu172/a65a4b45faed2bd3fa74b24163e4256e我的 eslint 基于这篇文章https://gist.github.com/1natsu172/a65a4b45faed2bd3fa74b24163e4256e
Using eslint src --ext .ts,.tsx
fixed it for me.使用
eslint src --ext .ts,.tsx
为我修复了它。
See https://stackoverflow.com/a/43742235/691083 for more background information.有关更多背景信息,请参阅https://stackoverflow.com/a/43742235/691083 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.