Removing [ts] errors from JS files In VS Code

后端 未结 8 1056
有刺的猬
有刺的猬 2021-01-31 14:44

I get these TypeScript errors VS Code while I\'m working in JS files. Is there anything I can do to disable this? I have put this in my settings and did not solve the issue:

相关标签:
8条回答
  • 2021-01-31 15:45

    Open settings in your VSC.
    To open your user and workspace settings, use the following VS Code menu command:

    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
      Check if tslint.jsEnable is set to false

      // Control whether tslint is enabled for JavaScript files or not.
      "tslint.jsEnable": false,

    Set it to false in workspace settings section

    From the documentation:
    tslint.enable - enable/disable tslint.
    tslint.jsEnable - enable/disable tslint for .js files, default is false.

    0 讨论(0)
  • 2021-01-31 15:46

    On visual studio code File > Preferences > Settings Go to Extensions->TypeScript-> Javascript>Validate make sure Enable/disable JavaScript validatio

    0 讨论(0)
提交回复
热议问题