Skip to content

fix: post-React 19 cleanup — remove dead deps, wire up ESLint plugins, modernize entry#11

Merged
willwillis merged 1 commit into
mainfrom
react-19-cleanup
May 1, 2026
Merged

fix: post-React 19 cleanup — remove dead deps, wire up ESLint plugins, modernize entry#11
willwillis merged 1 commit into
mainfrom
react-19-cleanup

Conversation

@willwillis
Copy link
Copy Markdown
Owner

Summary

Follow-up cleanup from the React 19 upgrade (PR #10). Addresses overlooked items identified during post-merge review.

Changes

🔴 Fixes

  • Remove unused react-router-dom — upgraded to v7 in feat: upgrade to React 19, Vite 8, ESLint 10, TypeScript 6, React Router v7 #10 but never imported anywhere in source code. Eliminates ~7 transitive packages from the dependency tree.
  • Wire up ESLint pluginseslint-plugin-react-hooks (v7) and eslint-plugin-react-refresh (v0.5) were installed but never configured in eslint.config.js. Now enforces rules-of-hooks (error) and exhaustive-deps (warn).

🟡 Cleanup

  • Idiomatic React 19 entry pointmain.tsx now uses named imports (createRoot, StrictMode) instead of namespace import (ReactDOM.createRoot, React.StrictMode).
  • Drop as any cast on import.meta.env — the vite-env.d.ts added in feat: upgrade to React 19, Vite 8, ESLint 10, TypeScript 6, React Router v7 #10 provides proper types; the (import.meta as any) workaround in api.ts is no longer needed.
  • Consolidate duplicate vite-env.d.ts — merged root-level frontend/vite-env.d.ts (with ImportMetaEnv interface) into frontend/src/vite-env.d.ts (the one actually in tsconfig include path). Deleted the dead root-level copy.
  • Remove redundant autoprefixer — Tailwind CSS v4 includes autoprefixing built-in. Removed from both package.json and postcss.config.js.
  • Re-enable CI checkstsc --noEmit and npm audit --audit-level=moderate were skipped with TODO comments; both now pass clean.

Verification

  • npm run lint — passes (now with react-hooks and react-refresh rules active)
  • npx tsc --noEmit — passes
  • npm run test -- --run — 3/3 pass
  • npm run build — passes
  • npm audit — 0 vulnerabilities
  • npm outdated — nothing outdated

…, modernize entry

- Remove unused react-router-dom (v7 was never imported anywhere)
- Remove redundant autoprefixer (built into Tailwind CSS v4)
- Wire up eslint-plugin-react-hooks and eslint-plugin-react-refresh
  in eslint.config.js (rules-of-hooks, exhaustive-deps now enforced)
- Use idiomatic React 19 imports in main.tsx (named createRoot/StrictMode)
- Drop `as any` cast on import.meta.env now that vite-env.d.ts provides types
- Consolidate duplicate vite-env.d.ts into src/vite-env.d.ts, delete root copy
- Re-enable tsc --noEmit and npm audit in CI (both pass clean)
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.52%. Comparing base (1c1d576) to head (1c08722).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #11   +/-   ##
=======================================
  Coverage   71.52%   71.52%           
=======================================
  Files           6        6           
  Lines         288      288           
=======================================
  Hits          206      206           
  Misses         82       82           
Flag Coverage Δ
backend 71.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@willwillis willwillis merged commit 598cbb0 into main May 1, 2026
10 checks passed
@willwillis willwillis deleted the react-19-cleanup branch May 1, 2026 05:56
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.

1 participant