Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert when ESLint is slow and suggest troubleshoot #1958

Open
danielpaz6 opened this issue Dec 10, 2024 · 4 comments
Open

Alert when ESLint is slow and suggest troubleshoot #1958

danielpaz6 opened this issue Dec 10, 2024 · 4 comments
Labels
info-needed Issue requires more information from poster

Comments

@danielpaz6
Copy link

danielpaz6 commented Dec 10, 2024

After installing ESLint my vscode was very slow, there was not a popup or any troubleshooting to help me solve that issue.

Some people are not as determined as me to solve that issue and might live with that if there's no significant degradation (in my case it was 6s but others complained about minutes) and might live with bad performance IDE or migrate to another one.

Eventually, I found out that the typescript.tsdk used by VSCODE was not aligned to the typescript.tsdk version, and I solved that by manually pointed to my ./node_modules/typescript/lib:
#1568

My suggestion is to reflect that needed solution to the user, by any means, on VSCode code you know that I have ESLint enabled, you also know that I have node_modules with typescript, and u can also know the time it took to execute ESLINT and if it's ok or not (there's on the bottom toolbar a note)

So if these 3 conditions sufficient, you can check if the typescriot.tsdk is aligned with the version on node_modules, because, apparently it is a requirement, and if the user needs to do that manually, I would have expected a more noticeable message or even force the user to fill it up in order to use ESLINT.

I know that this solution might couple vscode from extensions (or not, I would just guess), but even if that's the situation, ESLINT is used by tens of millions of people, and the fact that it so easy to have a DEFAULT configuration (I was just npm installed eslint and downloaded ESLint vscode extension) with super slow ESlint is just bad. So the impact of disallowing "bad" behavior has huge impact considered how many people use ESLINT and how many are probably affected by this as me.

NOTE: also need to consider multi project workspace / folder

@mjbvz mjbvz transferred this issue from microsoft/vscode Dec 10, 2024
@mjbvz mjbvz removed their assignment Dec 10, 2024
@dbaeumer
Copy link
Member

@danielpaz6 can you share the setup in which you have experienced this. Actually, when the ESLint validation is slow it should show this in the language status indicator so that developers are aware of this. I would really like to understand, why this is not happening (see the two settings eslint.timeBudget.onValidation and eslint.timeBudget.onFixes, which default to 4s and 3s)

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Dec 11, 2024
@dbaeumer
Copy link
Member

The typescriot.tsdk setting has no effect on ESLint. ESLint, when the typescript plugin is installed, has its own TS configuration. What might be shared is the node modules if both the workspace and the ESLint typescript plugin use the same version.

@danielpaz6
Copy link
Author

Thanks @dbaeumer.
So essentially you say that the change to typescript.tsdk path shouldn't have any impact on the performance? Because after doing so (with the suggestion #1568 (comment) that also have other thumbs up) I did actually notice a significant improvement. But maybe it could have been other things like caching and stuff like that?

@dbaeumer
Copy link
Member

Yes, setting the typescript.tsdk has no impact on ESLint. It is only used by the TypeScript extension that ships with VS Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants