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:
You can suppress TSLint rules for the current file and even for the current line. WebStorm automatically generates disable comments in the format /* tslint:disable:<rule name> or // tslint:disable-next-line:<rule name> and places them on top of the file or above the current line respectively.
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:
Settings/Preferences
Editor | Inspections
tslint
)Severity
to a desired levelP.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).
LazyOne's solution was already what I had in my setup. But then I found this checkbox that solved the problem for me:
Probably not the best way of doing it if you want to have a better granularization, but it might help some people
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With