TSLint: Language service execution timeout in WebStorm

4.3k Views Asked by At

I'm currently using WebStorm (2017.2.4) on MacOS Sierra and this pop-up shows up once in a while:

Error message

My colleagues and I have exactly the same TSLint config and code style defined in WebStorm. The problem occurs only on my machine.

I've tried to:

  • invalided caches and restart
  • reinstall node packages and npm

With no success.

2

There are 2 best solutions below

1
On

I'm not sure whether this will solve your problem or not.

Enable the plugin in your tsconfig.json file:

{
  "compilerOptions": {
    "plugins": [
      { "name": "tslint-language-service"}
    ]
  }
}

For more detail, please go to this URL: https://www.npmjs.com/package/tslint-language-service

1
On

Probably this is due to a big file being linted. I encountered the same problem while I was running code inspection with WS 2017.3.4 and it showed me the exact file where it came from. It's a TypeScript file with only 8 lines but one of them is soft wrapped like 300 lines.

I put a // tslint:disable on the first line because I anyway didn't need to lint this data file and the problem disappeared.