How to Disable the red wavy Underline in Visual Studio Code

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# Disable the red wavy Underline in Visual Studio Code

The red, yellow and blue underlines in VS Code are:

  • linting errors
  • warnings
  • informational warnings

As you write code, VS Code runs validation and informs you when an error occurs or a warning pops up.

code shows red wavy error underline

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:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type CSS validate and uncheck the CSS: Validate checkbox.

disable css red and yellow wavy underline

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.

disable html validation

The same can be done for JavaScript, TypeScript, etc.

disable javascript validation

# Disable the red wavy Underline for Python in VS Code

If you need to disable the red wavy underline for Python:

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type select linter and click on Python: Select Linter.

disable python red wavy underline

  1. Select Disable Linting.

select disable linting

# Disable the red wavy underline Globally in VS Code

If you need to disable the red, yellow and blue underlines globally in VS Code:

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Set the color of the error, warning and info underlines to transparent.

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.

settings.json
{ "workbench.colorCustomizations": { "editorError.foreground": "#00000000", "editorWarning.foreground": "#00000000", "editorInfo.foreground": "#00000000" }, // ... other settings }

set wavy underline colors to transparent

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.

red error underline no longer shown

# Disable the red wavy underline locally in the current project

You can also disable the red, yellow and blue underlines, locally, specific to your current project.

  1. In the root directory of your project, create a .vscode folder.

  2. Create a settings.json file in the .vscode folder.

  3. Add the following code to your settings.json file.

.vscode/settings.json
{ "workbench.colorCustomizations": { "editorError.foreground": "#00000000", "editorWarning.foreground": "#00000000", "editorInfo.foreground": "#00000000" } }

disable red yellow underline for specific project

Properties set in your local .vscode/settings.json file override any global configuration.

The local properties only apply to your current workspace (project).

# Additional Resources

You can learn more about the related topics by checking out the following tutorials:

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.