How do I disable typescript warnings and TS all together in Visual Studio Code for regular javascript files when working with sveltekit? When I create a project I say no to use of TS.
Actually, how do I disable the annoying popup with MDN Reference, warnings and what not in VSCode all together? This has been asked before, many times but I don't think there's a definite answer. Or has it? What is the problem? Why hasn't this been solved?
The latest version of the SvelteKit template (the one you get when initializing a new project) has fixed many of the issue that come up for those of us using regular JavaScript. (there is now also an option to have type-checked JavaScript which gives you hints about types without the stranglehold of TypeScript). So it could be worth starting a new project and copying over your components/pages.
To disable the general "hover" behaviour of VSCode, you can set this with
"editor.hover.enabled": "false"
But this cuts a lot of functionality of VSCode, at that moment you have merely a better looking version of notepad.
SvelteKit works perfectly fine with just regular JavaScript, it was actually developed without TypeScript originally because the developers felt that progress was faster without it, but that is of course very subjective.
Well, sveltekit is a Typescript project so I'm not sure why you would want to use standard JS.
If you still consider to use JS, you have to disable the validation for javascript with
"javascript.validate.enable": false
in your editor's settings.json. But be aware that this disables all built-in syntax checking.
If you are specifically concerned about import/export errors, you could also add a jsconfig.json to your project, which includes:
{
"compilerOptions": {
"module": "es2015"
}
}
Regarding the MDN Popup. Not sure what exactly you are referencing to but have you tried to add
"editor.hover.enabled": false
to your settings.json? You could also hit Ctrl + , search for MDN and see what you can deselect.