Reputation: 872
My VSCODE shows warnings as if they were errors (specifically linter warnings).
I want linter warnings to show with different unerline color. I tried modifying my settings.json
adding the following configuration
"workbench.colorCustomizations": {
"editorError.foreground": "#ff0000",
"editorWarning.foreground": "#ffc400",
"editorInfo.foreground": "#35ffab"
},
But it seems like VSCODE thinks that those are not warnings but errors
Upvotes: 2
Views: 2148
Reputation: 872
Figured it out.
Turns out for some reason the default Typescript linter (that shows warnings properly) was disabled.
Eslint was the culprit showing warnings as error (which makes sense, considering it's a linter that by definition should fail if there are lint issues)
After disabling ESLint and enabling the built in default validator (image attached)
Warnings show up correctly now (without red underlines/errors in the problems window)
Upvotes: 3
Reputation: 887
By default @typescript-eslint/no-unused-vars
's level is error.
To downgrade this to a warning, you can change your .eslintrc.js
:
module.exports = {
...
rules: {
...
"@typescript-eslint/no-unused-vars": ["warn"]
}
}
NB: You may have to restart your vscode to see the changes
Upvotes: 3