Hacker News new | ask | show | jobs
by sadturnip 2229 days ago
Does anyone know if they have addressed the major performance problems with typescript?

This was a few months ago, but tslint takes a few seconds on one of our larger code bases. However ESLint with the typescript plugin would take up to a minute+, and seemed to make webstorm struggle with the eslint integration.

3 comments

Could it be that you were using type-aware linting rules? If you have these rules enabled, ESLint basically has to compile all your TS files to check if the rules are followed. Note that most of the ESLint rules are _not_ type aware, but following the setup guides quickly has you turning them on “by accident”. For more details, see: https://github.com/typescript-eslint/typescript-eslint/blob/...
Been testing it out the beta, in my experience performance is better but still behind tslint, though tslint lacks a ton of rules compared to eslint so I am guessing that is partially why. I think the webstorm struggle is a webstorm specific issue, I've seen a few of my co-workers experience similar webstorm slow downs from eslint (and ts) but it works fine for me in vim without any slowdown of the editor itself.
You’ll probably need to be more specific about the speed issues you’re seeing. I don’t see that issue, but I also factor my code into smaller packages in my monorepo (which is a good practice). I still have relatively long lint times against the monorepo (greater than a minute), but that’s part of the CI stage.