简体   繁体   中英

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

For some reason all the tslint hints are shown as errors with a red underline. 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

Like in in the demo gif it should be green and not red

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" . More info here .

But it looks like there is a bug in vscode-tslint. See the following thread

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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