Disable TSLint in VSCode

后端 未结 6 632
太阳男子
太阳男子 2021-01-31 06:59

So this feels like this should be such an easy task but it\'s starting to drive me insane. I can\'t seem to turn off TSLint or TS or whatever it is that gives me these errors. I

6条回答
  •  天命终不由人
    2021-01-31 07:38

    I've been hunting around for this answer for the better part of a month now. I found a solution that works in VS Code that isn't a wholesale disabling of all validation for javascript and also did not require that I add files/declarations to a repository that is not mine.

    Add this line to your user settings:

    "javascript.suggestionActions.enabled": false

    Unlike "javascript.validate.enable": false (which you should not use), the above setting will remove those annoying [ts] Could not find a declaration file for module errors for untyped module imports in javascript files and it will still play nice with linters and give you appropriate and relevant errors.

提交回复
热议问题