Vscode: Disable validation of specific typescript files

Created on 4 Jan 2019  路  3Comments  路  Source: microsoft/vscode

Issue Type: Bug

Tested on this repo:
https://github.com/itslenny/scaffs
These files:
https://github.com/itslenny/scaffs/tree/master/test/data/scaffolds/Example

Knowing that:
1) the scaffold files have to be *.ts so changing file extension wont help

Expected Result:
after putting in settings.json "files.watcherExclude" to exclude this folder and also in tsconfig.json "exclude" the folder, VSCode's Problem Viewer should not show [ts] errors.

Real Result:
VSCode shows that these files are erronous

settings.json (please note, i tried so many variances until landed ignore whole folder)
image

tsconfig.json (as well added the whole folder)
image

errors (though VSCode should not look into them)
image

VS Code version: Code 1.30.0 (c6e592b2b5770e40a98cb9c2715a8ef89aec3d74, 2018-12-11T22:21:33.585Z)
OS version: Linux x64 4.18.0-13-generic


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz (8 x 976)|
|GPU Status|2d_canvas: unavailable_software
checker_imaging: disabled_off
flash_3d: unavailable_software
flash_stage3d: unavailable_software
flash_stage3d_baseline: unavailable_software
gpu_compositing: unavailable_software
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: enabled_readback
webgl2: unavailable_off|
|Load (avg)|1, 1, 1|
|Memory (System)|5.73GB (0.94GB free)|
|Process Argv|.|
|Screen Reader|no|
|VM|0%|


*out-of-scope typescript

Most helpful comment

Yes, vscode's exclude settings are not related to typescript validation. And the tsconfig exclude setting configures the TypeScript project, it will also not disable validation for TS files you open

A few options:

All 3 comments

I think this is related to ts, not the watcher

yes it does seem so, yet isnt it supposed at least via tsconfig>exclude to understand that this file is not to be validated? and actually linting errors disappeared after i excluded the files in tslint.config.json so there must be a charm somewhere. Otherwise, how could I solve this one problem?

Yes, vscode's exclude settings are not related to typescript validation. And the tsconfig exclude setting configures the TypeScript project, it will also not disable validation for TS files you open

A few options:

Was this page helpful?
0 / 5 - 0 ratings