How to disable error highlighting in VS Code?

I need to disable error highlighting in Java files in VS Code. VS Code tries to check a Groovy file while thinking it is a Java file.

As you can see in the picture all imports after the first and the types after the first field are highlighted red (due to missing semicolons). However I do not want the error check for this Groovy file. enter image description here

NOTE: I only have the plugins Clang, RedHat.Java, Markdown PDF, Sort Lines, and Uncrustify installed. Even if I disable all the red highlighting is visible.

Answers

I found this:

"problems.decorations.enabled": false,
Posted on by Anacarde

open your preferences file and add this

"java.validate.enable": false

I didn't try it for java, but it works for typescript.

Posted on by John Henckel

You should disable the linter, which is by default enable in VS Code. To do so you can go to File-> Prefrences -> setting

Posted on by Ajinkya Dhote