简体   繁体   English

VSCode:tslint-language-service插件将lint提示显示为错误而不是警告

[英]VSCode: tslint-language-service plugin shows lint hints as error and not warning

I am using Visual Studio Code 1.12.1 with Typescript 2.3.2 and the enabled plugin tslint-language-service: 0.9.3 with tslint: 5.2.0 我使用VisualScript Code 1.12.1Typescript 2.3.2和启用的插件tslint-language-service: 0.9.3 with tslint: 5.2.0

For some reason all the tslint hints are shown as errors with a red underline. 由于某种原因,所有tslint提示都显示为带有红色下划线的错误。 I would like to have it as a warning with a green/yellow underline. 我希望将其作为绿色/黄色下划线的警告。

How can I do it? 我该怎么做? This is the plugin I am using with the new Typescript version https://github.com/angelozerr/tslint-language-service#vscode 这是我使用新的Typescript版本的插件https://github.com/angelozerr/tslint-language-service#vscode

Like in in the demo gif it should be green and not red 就像在演示gif中一样,它应该是绿色而不是红色

https://github.com/angelozerr/tslint-language-service/raw/master/images/TslintLanguageServiceDemoVSCode.gif https://github.com/angelozerr/tslint-language-service/raw/master/images/TslintLanguageServiceDemoVSCode.gif

To treat linting errors like warnings you should modify your tslint.json and include the following option: "defaultSeverity": "warning" . 要处理警告等linting错误,您应该修改tslint.json并包含以下选项: "defaultSeverity": "warning" More info here . 更多信息在这里

But it looks like there is a bug in vscode-tslint. 但看起来vscode-tslint中存在一个错误。 See the following thread 请参阅以下主题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM