Skip to content

chore(ts): mechanical strict-mode prep fixes (Class 4)#12

Open
abdout wants to merge 1 commit into
mainfrom
chore/ts-class4-misc
Open

chore(ts): mechanical strict-mode prep fixes (Class 4)#12
abdout wants to merge 1 commit into
mainfrom
chore/ts-class4-misc

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented Apr 25, 2026

Summary

  • 7 isolated TS errors surfaced by the `ignoreBuildErrors` audit (36 errors / 28 files / 5 classes total).
  • This PR covers Class 4 — mechanical fixes that need no product or schema decisions. Verified locally: `tsc --noEmit` shows zero errors for the 7 files touched here.

Changes (per file)

  • `prisma.config.ts` — drop `earlyAccess: true` (removed in Prisma 7 GA)
  • `src/app/sitemap.ts` — drop the redundant `Locale[]` mutable annotation
  • `src/components/chatbot/chat-button.tsx` — initialize `useRef` with `null`
  • `src/components/marketing/pricing/sections/features.tsx` — cast icon key
  • `src/components/ui/language-switcher.tsx` — drop unreachable `|| .name` fallback (literal narrowing)
  • `src/components/ui/optimized-image.tsx` — add `quality?: number` to props type
  • `src/components/wizard/branding/actions.ts` — `error.errors` → `error.issues` for Zod 4

Test plan

  • `pnpm tsc --noEmit` clean for the 7 touched files
  • LanguageSwitcher still shows correct native name on /en and /ar
  • Pricing features section renders with the right icons
  • Chatbot button still responds to scroll-debounce inversion
  • Wizard branding form surfaces a validation error message on bad input

Follow-ups

Remaining classes (in separate PRs):

  • Class 3 (dict drift, 6 errors) — next PR
  • Class 5 (Next 16 `LayoutProps`, 1 error) — after PR fix(auth): restore SessionProvider in [lang]/layout #10 (SessionProvider) merges to avoid conflict
  • Class 2 (`User.username` schema drift, 8 errors) — needs your decision: restore field or refactor to `name`?
  • Class 1 (12 dead imports from clone artifacts) — needs per-feature decisions

Closes #11

🤖 Generated with Claude Code

Seven isolated, non-decision TS errors surfaced by the ignoreBuildErrors
audit — all type-only or trivial:

- prisma.config: drop earlyAccess (Prisma 7 GA dropped the opt-in)
- sitemap: drop redundant Locale[] cast on readonly array
- chat-button: initialize useRef with null (React 19 requirement)
- pricing/features: type the icon key as keyof typeof Icons
- language-switcher: drop unreachable || fallback (TS narrowed to never)
- optimized-image: add quality?: number to OptimizedImageProps
- wizard/branding: ZodError.errors → error.issues (Zod 4)

Closes #11

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marketing Ready Ready Preview, Comment Apr 25, 2026 9:38am

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.

chore(ts): mechanical strict-mode prep fixes (Class 4)

1 participant