Svelte for VS Code extension crushes react project
See original GitHub issueDescribe the bug After installing the Svelte for VS Code extension in my editor to work on a svelte project, a different project written in react and typescript completely crushes and throws ts error all over the place:
Type '() => svelte.JSX.Element' is not assignable to type 'FC<{}>'.
Type 'Element' is not assignable to type 'ReactElement<any, any> | null'.
Type 'Element' is missing the following properties from type 'ReactElement<any, any>': type, props, key
literally every .tsx file throw errors, the project worked flawlessly before installing the svelte extension.
The only way I found so far, is to disable the extension every time I’m not working on a svelte project, which sucks, you know.
To Reproduce Steps to reproduce the behavior:
Open a react-ts project with the svelte extension in VSCode i guess.
Expected behavior svelte extension doesn’t influence non-svelte projects
Screenshots
System (please complete the following information):
- OS: MAC OS
- IDE: VSCode
- Plugin/Package: “Svelte for VSCode”
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Svelte for VS Code - Visual Studio Marketplace
Svelte for VS Code. Provides syntax highlighting and rich intellisense for Svelte components in VS Code, using the svelte language server.
Read more >Must Have VS Code Extension for Working with SvelteKit
SvelteKit is one of the best frameworks out there, and working with it just got much much easier!Check out this new extension in...
Read more >Top 10 Best VS Code Extensions for Svelte Developers
1. Svelte for VS Code · 2. Svelte Intellisense · 3. Svelte 3 Snippets · 4. Tailwind CSS IntelliSense · 5. Better Comments...
Read more >How To Use Svelte With Tailwind CSS | by Samuele
As I said a few days ago I decided to focus on some more complex projects. The first is “GEST — Dashboard”. Bad...
Read more >Svelte vs Vue - Which one to choose? - ButterCMS
For a long time, there were only three contenders for the title of “the best JavaScript UI framework” - React, Vue, and Angular....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the same problem in a monorepo containing svelte and react projects.
The most recent versions of the extension and
svelte-check
contain a new transformation behind a flag which should fix this issue. You can try out the new transformation usingPlease try it out, more info in #1352