Typescript errors in code

Hi i have a wired issue. In all my typescript projects there is like everything marked as a error. Examples are in the screenshot. I searched the web and tried a lot of things, like updating ts, modifying the tsconfig and eslint config. But the problem appears in all my projects and in cursor and vscode. It runs grate but all these red error are a little bit annoying.
No description
6 Replies
Huijiro
Huijiro4mo ago
Typescript doesn't know JSX exists, you need to enable it, I forget how now.
cunu
cunu4mo ago
Did you include
"jsx": "preserve" in your tsconfig?
DumDum
DumDum4mo ago
Can you add import React fro "react"; at the top to see if that fixes the issue?
stpnx
stpnx4mo ago
try this one bro npm install @types/react @types/react-dom
.❀ tablet ❀.
add "jsxImportSource": "react", "jsx": "react" and "jsxFactory": "h" to your tsconfig

Did you find this page helpful?