CRA with typescript stopped type checking #11030
Unanswered
AJLoveChina
asked this question in
General
Replies: 1 comment
-
But I don't know why tslint is broken, does someone know? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a cloned question, original link @jakeboone02
There is no anwser in original question, but I happend to the same issue. I want to create a comment but not allowed.
After struggling for hours, I finally find the root cause.
I hope my answer can help others who have the same issue.
What's the issue?
I have a TypeScript/React application that I bootstrapped with create-react-app. It used to do type checking when I ran yarn start, but recently it stopped
What's the root cause?
In my project, I use
@svgr/cli
to convert svg to react components, it will also automatically create aindex.js
which export all svg comps, but there could be some js syntax errors because of some reasons. Then this file makes typescript type checking broken. The console will no longer print type errorsWhat's the solution?
PPS: in my project, the syntax error is like this
Beta Was this translation helpful? Give feedback.
All reactions