Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code: Change color of squiggly underline for Lint

My configurations currently show the same red squiggly line for Typescript errors and TSLint warnings.

I am using TSLint extension for Visual Studio Code but the configuration I believe is a general VS Code configuration.

This is what it should look like:

Image of what it should look like

I found this feature request to take it further than just Squiggly lines.

It's not a duplicate of "How to change error styles in VS Code" because I need to change the color of Lint's warnings only. NOT every error.

like image 585
Esteban Santini Avatar asked Aug 08 '17 22:08

Esteban Santini


People also ask

How do I enable red squiggly lines in Visual Studio Code?

Simply, go to settings by using ctrl + comma . Search for Error squiggles . Enable it or select EnabledIfIncludesResolve . Then click on Modified on Workspace , if it is disabled, then enable it.

What does yellow underline mean in VS Code?

Yellow: The line has been changed but not yet saved. Green: The line has been changed and saved. Orange: The line has been changed, saved, and the change undone.


2 Answers

There is a setting to have the tslint extension return warnings (green) instead of errors (red): "tslint.alwaysShowRuleFailuresAsWarnings": true

Also, you can change your tslint config to determine which issues are errors, and which are warnings.

like image 60
Rob Lourens Avatar answered Nov 05 '22 22:11

Rob Lourens


VSCode v1.17 added the ability to set the color of warnings ("squiggles") and info:

Modify warning and info squiggles.

"workbench.colorCustomizations": {   "editorWarning.foreground": "#ff0",   "editorInfo.foreground": "#00f" } 
like image 42
Mark Avatar answered Nov 05 '22 23:11

Mark