问题描述
我的配置目前对 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 下划线的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!