Skip to content

fix: frontend lint tests ci#38

Merged
Youdahe123 merged 4 commits into
mainfrom
fix/frontend-lint-tests-ci
Jun 28, 2026
Merged

fix: frontend lint tests ci#38
Youdahe123 merged 4 commits into
mainfrom
fix/frontend-lint-tests-ci

Conversation

@baohuy1303

Copy link
Copy Markdown
Contributor

Fixes both frontend-build and frontend-lint jobs. Both pass on this branch.
Closes #37

What was done

Phase What
1 Changed CI type-check step from tsc --noEmit to tsc -b --noEmit
2 Fixed 40 tsc -b build errors across 12 files: Tiptap v3 API, @types/three install, React 19 useRef overloads, status enum bug in DocumentsPanel.tsx, assorted unused imports
3a Mechanical ESLint fixes (27 errors): no-empty (allowEmptyCatch), react-refresh/only-export-components (allowExportNames), unused vars, react-hooks/purity, react-hooks/rules-of-hooks, hoisted ToolbarButton in NotesEditor.tsx
3b Fixed all 50 @typescript-eslint/no-explicit-any errors. ConceptGraph3D.tsx and StudentMemoryGraph.tsx (30 of 50) got proper discriminated-union scene-node types using NodeObject/LinkObject from react-force-graph-3d. The remaining 20 (catch (e: any) patterns across 7 files) were converted to the repo's e instanceof Error ? e.message : 'fallback' convention
3c Fixed 12 react-hooks/set-state-in-effect errors (new v7 rule). Removed redundant synchronous setState calls, moved one-time URL parsing to narrow eslint-disable comments, switched two components to the "adjust state during render" pattern

Out of scope

The 5 react-hooks/exhaustive-deps warnings are pre-existing and do not fail npm run lint (no --max-warnings). Left as-is for a future pass.

Verification

npm run lint    # 0 errors, 5 warnings
npm run build   # tsc -b + vite build pass

@baohuy1303 baohuy1303 changed the title Fix/frontend lint tests ci fix: frontend lint tests ci Jun 14, 2026

@Youdahe123 Youdahe123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 --noEmit over tsc --noEmit is the right fix for project-reference setups — good catch.
  • The discriminated-union typing for ConceptGraph3D.tsx and StudentMemoryGraph.tsx using NodeObject/LinkObject from react-force-graph-3d is the right solution (not a cast to any).
  • catch (e: any)e instanceof Error ? e.message : 'fallback' is consistent with the existing repo convention.
  • Hoisting ToolbarButton out of the render scope in NotesEditor.tsx is a real correctness fix (new react-hooks/rules-of-hooks violation, not just a style issue).
  • The 5 remaining exhaustive-deps warnings being left as pre-existing is fine — no --max-warnings flag means they don't block CI.

One thing to verify:

  • eslint.config.js got 7 lines added. Make sure none of these are broad disable rules that mask real issues going forward. If they're scoped to specific rules with allowEmptyCatch/allowExportNames options (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.

@Youdahe123

Copy link
Copy Markdown
Contributor

Merge status

CI: 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.

Merge order: #36#38#34

Youdahe123 pushed a commit that referenced this pull request Jun 28, 2026
Fixes ruff, mypy, and pytest failures on main. All backend checks pass. Frontend failures are pre-existing, fixed by the companion PR #38.
@Youdahe123 Youdahe123 merged commit 0056006 into main Jun 28, 2026
2 of 4 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.

frontend-build and frontend-lint CI failing on main

2 participants