Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 src/** --ext .ts,.tsx")

I also get some error on 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

my eslint based onthis post https://gist.github.com/1natsu172/a65a4b45faed2bd3fa74b24163e4256e

like image 830
Tuz Avatar asked Feb 10 '20 06:02

Tuz


1 Answers

Using eslint src --ext .ts,.tsx fixed it for me.

See https://stackoverflow.com/a/43742235/691083 for more background information.

like image 174
mtsz Avatar answered Oct 12 '22 22:10

mtsz