Change WebStorm TSLint error lines to warning lines
Asked Answered
V

2

6

Is there a way to change in WebStorm the error red lines given by TSLint to a less alarming line (Warning or similar)?

Below is an example of what I want to avoid:

enter image description here

Variolite answered 31/7, 2017 at 22:49 Comment(0)
S
15

Integration with all linters (be it for JavaScript/TypeScript or PHP etc.) is done as an Inspection (so the results can be shown as errors/warnings and they can be run (results shown) via Code | Inspect Code). Therefore:

  1. Settings/Preferences
  2. Editor | Inspections
  3. Find your linter (use local search box and look for tslint)
  4. Change Severity to a desired level

P.S. In theory, if linter itself provides a severity (e.g. it says "ERROR" on "WARNING" in actual error description (like TSLint from v5 does)) .. then it may not be possible to override the severity (it depends on implementation from IDE side -- every linter has own integration implementation). Sorry, cannot verify this moment as I'm not using TSLint.

UPDATE 2018-05-17: There were some additional changes made in this regard (WEB-26119) for next major 2018.2 version -- try it when it will become available (EAP program will start in nearest future).

Satisfactory answered 1/8, 2017 at 9:3 Comment(3)
Exactly what I needed. Thanks!Variolite
It's available now and the only solution seems to be modifying defaultSeverity inside tslint. Too bad, I wish they made it optional.Nahamas
Apologies for gravedigging here, but I've just found that as of Webstorm 2019.2.1 (and maybe earlier) there is an option within the TSLint settings above Use rule severity from configuration file if this is unticked the severity level chosen in the dropdown can be used.Picky
P
2

LazyOne's solution was already what I had in my setup. But then I found this checkbox that solved the problem for me:

enter image description here

Probably not the best way of doing it if you want to have a better granularization, but it might help some people

Picturesque answered 29/7, 2020 at 14:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.