-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(eslint-plugin): migrate to vitest #10579
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
chore(eslint-plugin): migrate to vitest #10579
Conversation
Thanks for the PR, @43081j! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
View your CI Pipeline Execution ↗ for commit 1ace444.
☁️ Nx Cloud last updated this comment at |
a40aad9
to
4f4c6f1
Compare
Migrates from jest to vitest. The primary differences: - You must import `describe`, `it`, etc - Snapshots are not combined into one file by default - ESM test files must be `.mts` (since we're in a `commonjs` package)
Tries to keep a similar format for sake of code review. We can do a separate PR to drop this format and move to a snapshot per file in future.
4f4c6f1
to
d69f679
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10579 +/- ##
==========================================
+ Coverage 84.31% 90.82% +6.51%
==========================================
Files 497 497
Lines 27766 50192 +22426
Branches 5075 8267 +3192
==========================================
+ Hits 23411 45588 +22177
- Misses 4184 4589 +405
+ Partials 171 15 -156
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This is awesome, thanks for sending @43081j! I'd really like to dive in soon and see if we can get this merged. But we're a little swamped catching up on issues after the holiday & new year break, and this is a lot of changes. So it'll probably be a little while till we can take a deep look. 😬 In the meantime, some notes:
|
no particular reason, i just chose the package i was looking at at the time
ill have a look
we could use i think without the snapshot changes, it'd be a pretty small diff. so i'd prefer to keep them, but let me know if you don't |
i manually compared the coverage locally and it seems to all be right. just vite reports more statements, and there's now a if you could have a look at some point too, that'd be helpful |
+1 from me on the small diff 😄. I'd prefer not to keep them. The smaller the diff the better!
👍 ACK, we can help as part of the review if it's not figured out |
what i meant was that the imports don't add much to the diff, since the only reason this is a "big PR" is the snapshot changes rather than those imports. i'd rather keep the imports seeing as its where we want to be if you diff without snapshots, its small (but of course we need those snapshot updates in this PR) as for the coverage change, im pretty sure it is just vite doing a much better job by using v8 coverage. that and the added |
+1 from me on having the smallest diff. Since this is already a large change, having it be gradual is a big plus. I think that moving from Vitest |
i think we're getting lost a bit here the imports don't contribute much at all to the diff. most of the diff is from snapshot updates, maybe its worth taking another look im happy to use globals but i think we're picking at a minor thing that actually doesn't contribute much to the diff |
2a0f201
to
265a448
Compare
265a448
to
84e24b3
Compare
4badf75
to
e7c8adf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
eslint.config.mjs
Outdated
@@ -403,6 +403,18 @@ export default tseslint.config( | |||
'@typescript-eslint/no-unsafe-call': 'off', | |||
'@typescript-eslint/no-unsafe-member-access': 'off', | |||
'@typescript-eslint/no-unsafe-return': 'off', | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refer to #10978 (comment)
Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
Co-authored-by: Kirk Waiblinger <53019676+kirkwaiblinger@users.noreply.github.com>
Starting to see this once in a while:
https://cloud.nx.app/runs/EisURTJuXm/task/eslint-plugin%3Atest Something to keep an eye on... |
1a3ab0d
into
typescript-eslint:main
PR Checklist
Overview
this is just one possible PR for migrating to vitest
we need to avoid an unreviewable, giant PR, so the following has been done in this one:
Depends on #10582