VS Code:更改 Lint 下划线的颜色 [英] VS Code: Change color of squiggly underline for Lint

查看:37
本文介绍了VS Code:更改 Lint 下划线的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的配置目前对 Typescript 错误和 TSLint 警告显示相同的红色波浪线.

我正在为 Visual Studio Code 使用

我发现此功能请求不仅仅是 Squiggly 线条.>

它不是如何在 VS 中更改错误样式的副本代码",因为我只需要更改 Lint 警告的颜色.不是每个错误.

解决方案

有一个设置可以让 tslint 扩展返回警告(绿色)而不是错误(红色):"tslint.alwaysShowRuleFailuresAsWarnings": true

此外,您可以更改 tslint 配置以确定哪些问题是错误,哪些是警告.

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:

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.

解决方案

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.

这篇关于VS Code:更改 Lint 下划线的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆