fix: frontend lint tests ci#38
Conversation
f50a007 to
9f39edf
Compare
Youdahe123
left a comment
There was a problem hiding this comment.
Comprehensive frontend CI fix — 40 TypeScript errors, 27 ESLint errors, and 50 no-explicit-any violations cleared. The phased approach is easy to follow.
What's solid:
tsc -b --noEmitovertsc --noEmitis the right fix for project-reference setups — good catch.- The discriminated-union typing for
ConceptGraph3D.tsxandStudentMemoryGraph.tsxusingNodeObject/LinkObjectfromreact-force-graph-3dis the right solution (not a cast toany). catch (e: any)→e instanceof Error ? e.message : 'fallback'is consistent with the existing repo convention.- Hoisting
ToolbarButtonout of the render scope inNotesEditor.tsxis a real correctness fix (newreact-hooks/rules-of-hooksviolation, not just a style issue). - The 5 remaining
exhaustive-depswarnings being left as pre-existing is fine — no--max-warningsflag means they don't block CI.
One thing to verify:
eslint.config.jsgot 7 lines added. Make sure none of these are broaddisablerules that mask real issues going forward. If they're scoped to specific rules withallowEmptyCatch/allowExportNamesoptions (as described), that's fine — just worth a glance.
CI: Frontend lint + build now pass ✅. Backend lint/tests fail on this branch, but those are fixed in #36 (already reviewed).
Merge order: #34 → #36 → #38. Each PR fixes a different layer; merging in this order means all CI should be green on main after all three land.
✅ Approving.
Merge statusCI: Frontend lint ✅ Frontend build ✅ | Backend lint ❌ Backend tests ❌ (backend failures are pre-existing, fixed in #36) Blocked — waiting on #36 to merge first. Frontend CI is clean here. Backend failures exist because this branch predates #36's backend fixes. Once #36 lands on main, rebase this branch on main → all 4 CI checks should go green → ready to merge. |
Fixes ruff, mypy, and pytest failures on main. All backend checks pass. Frontend failures are pre-existing, fixed by the companion PR #38.
Fixes both
frontend-buildandfrontend-lintjobs. Both pass on this branch.Closes #37
What was done
tsc --noEmittotsc -b --noEmittsc -bbuild errors across 12 files: Tiptap v3 API,@types/threeinstall, React 19useRefoverloads, status enum bug inDocumentsPanel.tsx, assorted unused importsno-empty(allowEmptyCatch),react-refresh/only-export-components(allowExportNames), unused vars,react-hooks/purity,react-hooks/rules-of-hooks, hoistedToolbarButtoninNotesEditor.tsx@typescript-eslint/no-explicit-anyerrors.ConceptGraph3D.tsxandStudentMemoryGraph.tsx(30 of 50) got proper discriminated-union scene-node types usingNodeObject/LinkObjectfromreact-force-graph-3d. The remaining 20 (catch (e: any)patterns across 7 files) were converted to the repo'se instanceof Error ? e.message : 'fallback'conventionreact-hooks/set-state-in-effecterrors (new v7 rule). Removed redundant synchronoussetStatecalls, moved one-time URL parsing to narroweslint-disablecomments, switched two components to the "adjust state during render" patternOut of scope
The 5
react-hooks/exhaustive-depswarnings are pre-existing and do not failnpm run lint(no--max-warnings). Left as-is for a future pass.Verification