chore: adopt Ultracite, Oxlint, and TypeScript 7 - #263
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
As updated, CI/hooks/typecheck are likely to fail in clean environments due to gating on known existing lint/format debt and brittle .next type imports.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR migrates the repo off Vite+ tooling onto standalone Oxfmt/Oxlint via Ultracite, upgrades core frontend/tooling dependencies (notably TypeScript and Next), and updates the test harness accordingly (Vitest direct imports + jest-dom integration).
Changes:
- Replace Vite+ “vp” workflows/scripts with Oxfmt/Oxlint/Ultracite configuration and new
pnpmscripts. - Migrate Vitest imports across the test suite from
vite-plus/testtovitest, and update jest-dom typings/setup. - Update CI + hooks to run the new quality gates, plus supporting config updates (Knip, tsconfig, Next env typings).
File summaries
| File | Description |
|---|---|
| vitest.setup.ts | Switch test utilities to Vitest and keep global test mocks/helpers. |
| vitest.config.ts | Replace Vite+ config usage with vitest/config + vite env loading. |
| vite.config.ts | Remove legacy Vite+ toolchain config. |
| types/jest-dom.d.ts | Update jest-dom matcher typing integration for Vitest. |
| tsconfig.json | Minor TS config cleanup/formatting while moving to TS7 toolchain assumptions. |
| src/lib/diagnostics/diagnoseSetup.test.ts | Update tests to import from vitest. |
| src/lib/tests/matchHistory.test.ts | Update tests to import from vitest. |
| src/tests/utils/subscription.test.ts | Update tests to import from vitest. |
| src/tests/pages/profile-match-overview.test.tsx | Update tests to import from vitest. |
| src/tests/pages/match-history.test.tsx | Update tests to import from vitest. |
| src/tests/pages/dashboard/managers.test.tsx | Update tests to import from vitest. |
| src/tests/pages/dashboard/index.test.tsx | Update tests to import from vitest. |
| src/tests/pages/dashboard/billing.test.tsx | Update tests to import from vitest. |
| src/tests/pages/collection-navigation.test.tsx | Update tests to import from vitest. |
| src/tests/pages/api/win-loss-adjustments.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/webhooks/nowpayments.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/webhook-gift.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/user/gift-subscriptions.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/update-followers.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/update-emote-set.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/test-gift-notification.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/test-emote-set.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/subscription/by-username.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/webhook.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/utils/idempotency.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/services/customer-service.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/portal.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/gift-webhook.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/crypto-subscription.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/crypto-invoice.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/stripe/create-checkout.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/settings.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/settings-setting-key.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/settings-accounts.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/payment-status.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/notifications.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/languages.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/is-dotabod-live.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/install-token.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/hubspot/visitor-token.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/gift-subscription.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/diagnostics-status.test.ts | Update tests to import from vitest. |
| src/tests/pages/api/diagnostics-overlay-page.test.ts | Update tests to import from vitest. |
| src/tests/lib/whatsNew.test.ts | Update tests to import from vitest. |
| src/tests/lib/twitchHelixProfile.test.ts | Update tests to import from vitest. |
| src/tests/lib/theme/themeConfig.test.ts | Update tests to import from vitest. |
| src/tests/lib/stripe-server.test.ts | Update tests to import from vitest. |
| src/tests/lib/server/dashboardAccess.test.ts | Update tests to import from vitest. |
| src/tests/lib/reconcileTwitchProfile.test.ts | Update tests to import from vitest. |
| src/tests/lib/opennode-payment.test.ts | Update tests to import from vitest. |
| src/tests/lib/nowpayments.test.ts | Update tests to import from vitest. |
| src/tests/lib/nowpayments-payment.test.ts | Update tests to import from vitest. |
| src/tests/lib/nowpayments-checkout.test.ts | Update tests to import from vitest. |
| src/tests/lib/hubspot.test.ts | Update tests to import from vitest. |
| src/tests/lib/hooks/useUpdateSetting.test.tsx | Update tests to import from vitest. |
| src/tests/lib/hooks/useStreamOfflineNotification.test.tsx | Update tests to import from vitest. |
| src/tests/lib/hooks/useSocket.test.tsx | Update tests to import from vitest. |
| src/tests/lib/hooks/useLastFm.test.ts | Update tests to import from vitest. |
| src/tests/lib/gift-subscription.test.ts | Update tests to import from vitest. |
| src/tests/lib/dotaFindingMatchLabel.test.ts | Update tests to import from vitest. |
| src/tests/components/WhatsNewFeed.test.tsx | Update tests to import from vitest. |
| src/tests/components/WhatsNewFeatureCard.test.tsx | Update tests to import from vitest. |
| src/tests/components/Subscription/SubscriptionAlerts.test.tsx | Update tests to import from vitest. |
| src/tests/components/Plan/FeatureList.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/wl/WinLossCard.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/WinLossOverlay.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/rank/MMRBadge.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/PollOverlays.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/GiftAlert/GiftSubscriptionAlert.test.tsx | Update tests to import from vitest. |
| src/tests/components/Overlay/FindMatch.test.tsx | Update tests to import from vitest. |
| src/tests/components/NewFeaturesCard.test.tsx | Update tests to import from vitest. |
| src/tests/components/Input.test.tsx | Update tests to import from vitest. |
| src/tests/components/HubSpot.test.tsx | Update tests to import from vitest. |
| src/tests/components/Gift/GiftPreview.test.tsx | Update tests to import from vitest. |
| src/tests/components/Dashboard/UserAccountNav.test.tsx | Update tests to import from vitest. |
| src/tests/components/Dashboard/TierSwitch.test.tsx | Update tests to import from vitest. |
| src/tests/components/Dashboard/navigation.test.ts | Update tests to import from vitest. |
| src/tests/components/Dashboard/MmrForm.test.tsx | Update tests to import from vitest. |
| src/tests/components/Dashboard/DashboardShell.test.tsx | Update tests to import from vitest. |
| src/tests/components/CircleBackground.test.tsx | Update tests to import from vitest. |
| src/tests/components/Card.test.tsx | Update tests to import from vitest. |
| src/tests/components/Banner.test.tsx | Update tests to import from vitest. |
| src/tests/components/Badge.test.tsx | Update tests to import from vitest. |
| pnpm-workspace.yaml | Remove Vite+-specific overrides and add peer dependency allowance for Tailwind. |
| package.json | Replace Vite+ scripts/deps with Oxfmt/Oxlint/Ultracite, TS7, Vite/Vitest, Next upgrades. |
| oxlint.config.ts | Introduce Ultracite-based Oxlint config (core/react/next/vitest/anti-slop + plugins). |
| oxfmt.config.ts | Introduce Ultracite-based Oxfmt config with repo-specific ignores/format preferences. |
| next-env.d.ts | Adjust Next-generated type references/imports for updated Next typed artifacts. |
| lefthook.yml | Update pre-commit tooling from Vite+ to Oxfmt/Oxlint/Vitest. |
| knip.json | Expand Knip entries/ignores for new tooling + Supabase functions. |
| CLAUDE.md | Update repository tooling/testing guidance away from Vite+ and toward Oxfmt/Oxlint/Knip. |
| .github/workflows/ci.yml | Switch CI “check” step from vp check to pnpm quality. |
Review details
- Files reviewed: 89/93 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
supabase/functions/**; the Deno pass applies the same Ultracite policy with Deno/Worker globals and skips only Node-incompatible type analysis.Strict quality ratchet
pnpm qualityis a blocking CI gate and now passes. It runs Oxfmt, a checked-in Oxlint baseline ratchet, application and verifier TypeScript projects, and Knip. The ratchet runs both the strict app and Deno invocations with--disable-nested-config, and locks:It fails on every new or increased diagnostic. Removal of existing debt and an unambiguous lower complexity score require the explicit reviewed
pnpm lint:baseline:prune; baseline bootstrap requiresOXLINT_BASELINE_BOOTSTRAP=1and has no package script. No lint rules are made non-blocking or disabled.The pre-commit hook formats staged files and runs the complete app + quality-tool typechecks and test suite. It deliberately does not run raw staged Oxlint because a touched legacy file can contain unrelated, unfixable baselined debt; the strict ratchet remains blocking in CI.
Compatibility
eslint-plugin-githubremains omitted because itstypescript-eslintparser is not compatible with TypeScript 7. SonarJS and React Doctor remain enabled.Validation
pnpm install --frozen-lockfilepnpm qualitypnpm test— 80 files, 467 testspnpm exec lefthook validategit diff --check