Home > Software engineering >  How to solve the ongoing problem with Visual Studio Code and warnings, MDN Reference and more?
How to solve the ongoing problem with Visual Studio Code and warnings, MDN Reference and more?

Time:04-19

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?

CodePudding user response:

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.

  • Related