Removing [ts] errors from JS files In VS Code

后端 未结 8 1054
有刺的猬
有刺的猬 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.

提交回复
热议问题