-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: Vue + TypeScript project slowdown with v8 alpha #9312
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
Comments
This may be more to do with ProjectServices than anything. There is the general eslint-plugin-import issue. I personally use import-x on my repos and just manually patched it for now. Also, the way the vue-eslint-parser works, type checking template code destroys performance. Best suggestion I've seen right now is to send to the js parser (espree) and not use this plugin's rules. I've poked around a little and I think every template I'm pretty new to tsserver's editor API, but I'm kind of wondering if there is better way to deal with "incremental" project changes in some way to work with vue's behavior and for post initialization changes when using the vscode eslint lsp plugin. |
As was discovered on #8835 (comment), moving |
I have #9336 ready to go if the maintainers agree with this solution. Thanks! |
This is fantastic, thanks so much for the deep dives & splitting out @higherorderfunctor! I'm in-and-out this week and the next for conferences and trying to find the time to get to this ASAP. Apologies if there are delays between reviews - this is high priority IMO. |
Oh and @higherorderfunctor - could you please send me access? My email's on my GitHub profile. I'm happy to sign NDAs / whatever other standard paperwork 😄 |
@JoshuaKGoldberg are you looking for access to a test repo or access to my fix branch: https://github.com/higherorderfunctor/typescript-eslint/tree/patches2upstream? Assuming the former. We are using on-prem Intranet only enterprise GitLab. I'll see if I can produce a repo though to play with. |
@higherorderfunctor I'm not really able to comment on the fix but the investigation was fantastic, well done! @JoshuaKGoldberg If you meant access to my repo I can add you to it? |
I setup an example repo that combines effect, vuejs/docs, and AllkindsICP (random repo I found but it uses effect which is heavy on complex types). I've connected them with project references in the root of the repo. I tossed in some vue recommend plugin rules to give it something to churn on. This closely mirrors my work repository which is Effect on the backend with Effect/Vue on the front-end with a very similar monorepo structure using project references. const vueRules = overrideWith(vueOverrides, [
...tsRules,
...vueRecommended,
...compat.extends("@vue/eslint-config-typescript/recommended"),
...compat.extends("plugin:vuetify/recommended"),
...vueA11yPlugin.configs["flat/recommended"],
...compat.extends("@vue/eslint-config-prettier"),
{ rules: { "codegen/codegen": "off" } } // doesn't work with vue
]) The repo is located at (note the branch if cloning): https://github.com/higherorderfunctor/effect/tree/chore/eslint-testing
"@typescript-eslint/types": "higherorderfunctor/typescript-eslint#patches2upstream&path:packages/types",
"@typescript-eslint/typescript-estree": "higherorderfunctor/typescript-eslint#patches2upstream&path:packages/typescript-estree", To run some tests: # install deps
pnpm i # AllkindsICP
/etc/profiles/per-user/caubut/bin/time -v pnpm exec eslint 'packages/AllkindsICP/{tests,src}/**'
✖ 11479 problems (9513 errors, 1966 warnings)
5626 errors and 1953 warnings potentially fixable with the `--fix` option.
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:03.49
Maximum resident set size (kbytes): 2818164 # vue-docs
/etc/profiles/per-user/caubut/bin/time -v pnpm exec eslint 'packages/vue-docs/{tests,src}/**'
✖ 1668 problems (1569 errors, 99 warnings)
890 errors and 93 warnings potentially fixable with the `--fix` option.
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:27.11
Maximum resident set size (kbytes): 1536552 # whole repo
/etc/profiles/per-user/caubut/bin/time -v pnpm lint
✖ 19186 problems (17101 errors, 2085 warnings)
7551 errors and 2066 warnings potentially fixable with the `--fix` option.
Elapsed (wall clock) time (h:mm:ss or m:ss): 12:46.26
Maximum resident set size (kbytes): 4511236 To undo my combined "@typescript-eslint/types": "$typescript-eslint",
"@typescript-eslint/typescript-estree": "$typescript-eslint", # re-install deps
pnpm i # AllkindsICP
/etc/profiles/per-user/caubut/bin/time -v pnpm exec eslint 'packages/AllkindsICP/{tests,src}/**'
✖ 11479 problems (9513 errors, 1966 warnings)
5626 errors and 1953 warnings potentially fixable with the `--fix` option.
Elapsed (wall clock) time (h:mm:ss or m:ss): 36:32.52
Maximum resident set size (kbytes): 2894116 # vue-docs
/etc/profiles/per-user/caubut/bin/time -v pnpm exec eslint 'packages/vue-docs/{tests,src}/**'
✖ 1668 problems (1569 errors, 99 warnings)
890 errors and 93 warnings potentially fixable with the `--fix` option.
Elapsed (wall clock) time (h:mm:ss or m:ss): 15:38.62
Maximum resident set size (kbytes): 1939532 # whole repo
/etc/profiles/per-user/caubut/bin/time -v pnpm lint
# not even going to try
Below is everything in my combined patch:
@JoshuaKGoldberg I planned to break up into several PRs, |
This is the current sum of all changes: https://github.com/higherorderfunctor/typescript-eslint/pull/1/files It is using the branch: https://github.com/higherorderfunctor/typescript-eslint/tree/patches2upstream-no-build-artifacts This branch is my working branch with the changes but also build artifacts and some pnpm hacks: https://github.com/higherorderfunctor/typescript-eslint/tree/patches2upstream I'll try and keep my fork's |
I'm mainly looking for test repos: i.e. I want to see the reproductions. I'd like to play around with as many as possible to understand them. Especially minimum reproductions that don't have a ton of extra stuff. #9312 (comment) is an excellent example of this, thanks! cc @jfrs, anything you can send would be great too!
Heh, yeah, that'd definitely be preferable for us. If you don't have time then we can help with splitting up - but very happy to see that you did send a bunch split out. Thanks! 🙌 This issue has some of the best reproductions & reporting from multiple people we've gotten this year. Love it!! |
I've added you to the repository! 2 branches, Let me know if there's anything else I can do 😃 |
#9336 was merged into Thanks again all! ❤️ |
I just realised that I was looking at the wrong output for the
Thanks to everyone involved, this is great! |
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
After upgrading a fairly standard Vue + TypeScript project (ESLint from v8 to v9, and
typescript-eslint
from v7 to v8), with a similar configuration the linting time goes from +/- 20 seconds to 3 minutes.The command is
eslint src
, wheresrc
is a directory containing only.ts
and.vue
files.Old
.eslintrc.json
:New
eslint.config.js
Reproduction Repository Link
Private repository but I can give people access to it
Repro Steps
pnpm install
pnpm lint
Versions
typescript-eslint
8.0.0-alpha.29
TypeScript
5.4.5
ESLint
9.4.0
node
22.2.0
The text was updated successfully, but these errors were encountered: