Last updated: Apr 6, 2024
Reading time·3 min
The red, yellow and blue underlines in VS Code are:
As you write code, VS Code runs validation and informs you when an error occurs or a warning pops up.
You can either disable the errors and warnings for a specific language or globally.
For example, if you want to disable the wavy underline for CSS:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.The same approach can be used with other languages.
For example, HTML, JavaScript or TypeScript.
You could type HTML validate into the search field and disable validation for HTML.
The same can be done for JavaScript, TypeScript, etc.
If you need to disable the red wavy underline for Python:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.If you need to disable the red, yellow and blue underlines globally in VS Code:
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.Type user settings json.
Click on Preferences: Open User Settings (JSON)
Note: if you already have the workbench.colorCustomizations
property set in
your settings.json file, you have to add the
editor*
properties to the existing object.
{ "workbench.colorCustomizations": { "editorError.foreground": "#00000000", "editorWarning.foreground": "#00000000", "editorInfo.foreground": "#00000000" }, // ... other settings }
If you open a file that has errors or warnings, the red or yellow underlines are no longer shown because their color is set to transparent.
You can also disable the red, yellow and blue underlines, locally, specific to your current project.
In the root directory of your project, create a .vscode folder.
Create a settings.json
file in the .vscode
folder.
Add the following code to your settings.json
file.
{ "workbench.colorCustomizations": { "editorError.foreground": "#00000000", "editorWarning.foreground": "#00000000", "editorInfo.foreground": "#00000000" } }
Properties set in your local .vscode/settings.json
file override any global
configuration.
The local properties only apply to your current workspace (project).
You can learn more about the related topics by checking out the following tutorials: