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
Using eslint src --ext .ts,.tsx
fixed it for me.
See https://stackoverflow.com/a/43742235/691083 for more background information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.