15
votes

I have some rules in my tslint.json that require the --type-check functionality. WebStorm doesn't give me a way to add the command-line argument and to the TSLint plugin. It also doesn't give me a way to enable it from the GUI.

As a result TSLint crashes and the TSLint plugin reports an error and I can't see the inspections.

It works when I run TSLint from the command-line with the --type-check argument, but I need the inspections in the IDE.

Does anyone have a workaround for this situation?

1
Unfortunately, these CLI options are currently not supported in WebStorm. Here's a related issue: youtrack.jetbrains.com/issue/WEB-22778 Please follow the updates on that.Ekaterina Prigara
Is there a way to do this in 2019?Esqarrouth

1 Answers

3
votes

As of WebStorm 2017.2, this is now possible using a TypeScript language service plugin. You can install https://github.com/angelozerr/tslint-language-service and then add it to your tsconfig.json (see the instructions in the README), and it will make TSLint errors show up alongside normal TypeScript errors. You can then disable the built-in TSLint integration in WebStorm.

More background is in the relevant WebStorm issue: https://youtrack.jetbrains.com/issue/WEB-22778