chore(gui): migrate linting from ESLint to Oxlint - #1553
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe GUI lint toolchain changes from ESLint to Oxlint. The PR adds Oxlint rules and local i18n integration, updates existing suppressions, and runs conditional GUI lint before typechecking in CI. ChangesGUI Oxlint migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ READY
UI screenshot waived by the |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@gui/package.json`:
- Around line 9-11: Update the package.json lint:i18n script to include
src/main.tsx and src/provider-workspace-data.ts alongside the existing paths,
ensuring the dedicated command covers all files targeted by the Oxlint i18n
overrides.
In `@gui/src/components/provider-workspace/ProviderSettings.tsx`:
- Around line 108-110: Fix the stacked next-line suppressions in
gui/src/components/provider-workspace/ProviderSettings.tsx:108-110 and
gui/src/pages/Debug.tsx:147-149 by combining both rule IDs into a single
directive targeting the dependency-array line, or by using a scoped Oxlint
block. Preserve the intentional exhaustive-deps exceptions in both effect hooks.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a21501d6-6bf5-498e-bc36-7f9cac8dc023
⛔ Files ignored due to path filters (1)
gui/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (18)
.github/workflows/ci.ymlgui/.eslint/local-i18n-plugin.tsgui/.oxlintrc.jsongui/eslint.config.jsgui/package.jsongui/src/components/AddProviderModal.tsxgui/src/components/CodexPoolStrategySetting.tsxgui/src/components/combo-workspace-detail-panel.tsxgui/src/components/provider-workspace/ProviderAuthPanel.tsxgui/src/components/provider-workspace/ProviderOverview.tsxgui/src/components/provider-workspace/ProviderSettings.tsxgui/src/hooks/useCodexAccountPool.tsgui/src/hooks/useCodexAutoSwitch.tsgui/src/pages/Debug.tsxgui/src/pages/Models.tsxgui/src/pages/use-dashboard-data.tsgui/src/use-app-route-state.tsscripts/lint-gui-if-changed.ts
💤 Files with no reviewable changes (1)
- gui/eslint.config.js
cda3eb6 to
f4af179
Compare
Summary
.oxlintrc.jsonreact/react-compileras an explicit lint policy and carry over intentional hook/compiler suppressionsWhy
The existing GUI ESLint run took about 11.74s locally. Oxlint runs the same GUI lint contract in roughly 0.3–0.7s on this checkout, while keeping the project-specific i18n checks and React rules in place.
Validation
bun run typecheckcd gui && bun run lint— 0 warnings, 0 errorscd gui && bun run lint:i18n— 0 warnings, 0 errorscd gui && bun run buildcd gui && bun run test— 773 pass, 0 failgit diff --checkSuppression hygiene
The
new_suppressionhygiene findings are migration artifacts, not new behavioral exceptions. The flagged call sites already had targeted React Hooks suppressions before this PR; the migration extends those same exceptions to Oxlint'sreact/react-compilerumbrella rule where needed.This applies to:
gui/src/components/CodexPoolStrategySetting.tsxgui/src/components/provider-workspace/ProviderAuthPanel.tsxgui/src/pages/Models.tsxgui/src/use-app-route-state.tsNo broad rule disablement was added, and the underlying hook behavior is unchanged.
suppression-approvedis therefore the appropriate hygiene approval for these migrated suppressions.Notes
react/react-compileris enabled intentionally as part of the migration. Existing hook exceptions were preserved with targeted suppressions rather than broad rule disablement.Summary by CodeRabbit