Skip to content

chore: adopt Ultracite, Oxlint, and TypeScript 7 - #263

Merged
Geczy merged 8 commits into
masterfrom
chore/ultracite-oxlint-ts7
Sep 6, 2026
Merged

chore: adopt Ultracite, Oxlint, and TypeScript 7#263
Geczy merged 8 commits into
masterfrom
chore/ultracite-oxlint-ts7

Conversation

@Geczy

@Geczy Geczy commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Adopt Ultracite 7.10.8 with standalone Oxfmt 0.66.0 and Oxlint 1.81.0. The app configuration enables Ultracite core, React, Next, Vitest, and anti-slop presets, plus SonarJS and React Doctor; unused disable directives are errors.
  • Move to TypeScript 7.0.2, Oxlint TSGoLint 7.0.2001, Vitest 5.0.0, Vite 8.2.2, Next 16.3.4, and Node 24 in CI. Update compatible companions: @next/third-parties 16.3.4, React/react-dom 19.2.8, current React typings, Knip 6.34.0, and Lefthook 2.1.12.
  • Apply Oxfmt across the owned source tree and resolve the resulting type/test cleanup.
  • Lint Supabase Edge Functions in a separate Deno pass. The app pass excludes only 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 quality is 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:

  • Oxlint version, raw and resolved config hashes
  • exact CLI invocations and scopes
  • linted-file coverage
  • a diagnostic multiset with source spans and contextual anchors

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 requires OXLINT_BASELINE_BOOTSTRAP=1 and 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-github remains omitted because its typescript-eslint parser is not compatible with TypeScript 7. SonarJS and React Doctor remain enabled.

Validation

  • pnpm install --frozen-lockfile
  • pnpm quality
  • pnpm test — 80 files, 467 tests
  • pnpm exec lefthook validate
  • git diff --check
  • enforced pre-commit suite: format, tests, application + verifier typechecks

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 pnpm scripts.
  • Migrate Vitest imports across the test suite from vite-plus/test to vitest, 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.

Comment thread .github/workflows/ci.yml
Comment thread lefthook.yml Outdated
Comment thread supabase/functions/sync-hubspot/index.ts Fixed
@Geczy
Geczy merged commit f392558 into master Sep 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants