Description
Issue Type: Bug
Even though I noticed this problem recently, according to some sources I've searched this has been happening since 2018, at least:
https://stackoverflow.com/questions/51069070/removing-ts-errors-from-js-files-in-vs-code
https://stackoverflow.com/questions/42632215/how-to-disable-typescript-warnings-in-vscode
microsoft/vscode#51378
There are more similar entries and issues, but those are good enough for illustration purposes, I think.
The usual reply to this problem is to add the following to settings.json
:
"typescript.validate.enable": false,
"javascript.validate.enable": false,
Apparently, the first one is essential, the second one needed sometimes.
This is the bare minimum JavaScript file showing the problem (at least in my system):
self.example = 0;
The above code produces the warning: Property 'example' does not exist on type 'Window & typeof globalThis'.ts(2339)
I'm not using TypeScript at the moment, but I would not like to disable validation just because the TypeScript validator is checking my plain JavaScript files.
I'm not completely sure this is a bug, rather than some unintended side effect of the TypeScript extension or validator, but in my humble opinion the TypeScript validator should not be emitting this kind of warnings.
Is there any reason why TypeScript validator is trying to validate plain JavaScript files? Any way of disabling this or is the intended behaviour?
Thanks in advance.
VS Code version: Code 1.61.1 (c13f1abb110fc756f9b3a6f16670df9cd9d4cf63, 2021-10-14T01:19:42.089Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx (8 x 2296) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 13.95GB (8.12GB free) |
Process Argv | C:\Users\rauln\Desktop\trujaman --crash-reporter-id 615257f4-e02c-4d75-b713-fcc927501c9c --crash-reporter-id 615257f4-e02c-4d75-b713-fcc927501c9c --crash-reporter-id 615257f4-e02c-4d75-b713-fcc927501c9c |
Screen Reader | no |
VM | 0% |
Extensions (29)
Extension | Author (truncated) | Version |
---|---|---|
commit-message-editor | ada | 0.19.1 |
github-markdown-preview | bie | 0.1.0 |
markdown-checkbox | bie | 0.3.2 |
markdown-emoji | bie | 0.2.1 |
markdown-preview-github-styles | bie | 0.2.0 |
insert-unicode | bru | 0.13.1 |
vscode-eslint | dba | 2.2.1 |
githistory | don | 0.6.18 |
viml | dun | 0.1.7 |
large-comments | elg | 0.1.1 |
remotehub | Git | 0.16.0 |
reg | ion | 1.0.3 |
vscode-gutter-preview | kis | 0.28.0 |
git-graph | mhu | 1.30.0 |
vscode-language-pack-es | MS- | 1.61.5 |
python | ms- | 2021.10.1336267007 |
vscode-pylance | ms- | 2021.10.1 |
jupyter | ms- | 2021.9.1101343141 |
jupyter-keymap | ms- | 1.0.0 |
jupyter-renderers | ms- | 1.0.3 |
remote-wsl | ms- | 0.58.2 |
hexeditor | ms- | 1.8.2 |
live-server | ms- | 0.2.9 |
trailing-spaces | sha | 0.3.1 |
rewrap | stk | 1.14.0 |
code-spell-checker | str | 2.0.10 |
code-spell-checker-spanish | str | 2.0.2 |
shell-launcher | Tyr | 0.4.1 |
snippet | vsc | 0.8.1 |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30382697
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30371810
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedc:30364665
pythonvspyt187:30373474
vsqsis200cf:30381675
vsaa593cf:30376535
vssld246cf:30379912