Skip to content

chore(gui): migrate linting from ESLint to Oxlint - #1553

Merged
Wibias merged 3 commits into
lidge-jun:devfrom
Wibias:chore/oxlint-migration
Aug 12, 2026
Merged

chore(gui): migrate linting from ESLint to Oxlint#1553
Wibias merged 3 commits into
lidge-jun:devfrom
Wibias:chore/oxlint-migration

Conversation

@Wibias

@Wibias Wibias commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the GUI ESLint stack with Oxlint 1.76.0
  • preserve the existing TypeScript, React Hooks, refresh, and local i18n lint coverage in .oxlintrc.json
  • keep the custom i18n plugin working under Oxlint, including HTML character-reference handling
  • add react/react-compiler as an explicit lint policy and carry over intentional hook/compiler suppressions
  • remove the old ESLint dependencies/config and shrink the GUI lockfile accordingly
  • update the pre-push helper and move the GUI lint CI step earlier as a fast fail gate

Why

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 typecheck
  • cd gui && bun run lint — 0 warnings, 0 errors
  • cd gui && bun run lint:i18n — 0 warnings, 0 errors
  • cd gui && bun run build
  • cd gui && bun run test — 773 pass, 0 fail
  • git diff --check

Suppression hygiene

The new_suppression hygiene 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's react/react-compiler umbrella rule where needed.

This applies to:

  • gui/src/components/CodexPoolStrategySetting.tsx
  • gui/src/components/provider-workspace/ProviderAuthPanel.tsx
  • gui/src/pages/Models.tsx
  • gui/src/use-app-route-state.ts

No broad rule disablement was added, and the underlying hook behavior is unchanged. suppression-approved is therefore the appropriate hygiene approval for these migrated suppressions.

Notes

react/react-compiler is enabled intentionally as part of the migration. Existing hook exceptions were preserved with targeted suppressions rather than broad rule disablement.

Summary by CodeRabbit

  • Chores
    • Migrated GUI linting from ESLint to Oxlint for faster, more consistent code-quality checks.
    • Added comprehensive validation for TypeScript, React, browser code, and internationalization.
    • Updated continuous integration and pre-push checks to run the new GUI linting process.
    • Preserved existing application behavior with targeted exceptions for intentional React patterns.
    • Removed obsolete linting configuration and tooling while maintaining equivalent coverage.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 18b5e28e-6749-48a6-9505-b55d999f6823

📥 Commits

Reviewing files that changed from the base of the PR and between 582eb89 and cda3eb6.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • gui/package.json

📝 Walkthrough

Walkthrough

The 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.

Changes

GUI Oxlint migration

Layer / File(s) Summary
Lint contract and configuration
gui/.oxlintrc.json, gui/.eslint/local-i18n-plugin.ts
Adds Oxlint TypeScript, React, browser, ignore, and scoped i18n rules. The local plugin uses compatible local types and compares JSX text after removing HTML character references while preserving diagnostic text.
Package toolchain switch
gui/package.json, gui/eslint.config.js
Changes GUI lint scripts to Oxlint, removes ESLint dependencies and configuration, and adds Oxlint packages.
Source and CI integration
gui/src/..., .github/workflows/ci.yml, scripts/lint-gui-if-changed.ts
Updates existing lint suppressions for Oxlint React Compiler rules. CI runs conditional GUI Oxlint before typechecking. The helper reports Oxlint execution and generic lint-command errors.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: ingwannu, lidge-jun

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: migrating GUI linting from ESLint to Oxlint.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Wibias
Wibias marked this pull request as ready for review August 12, 2026 18:20
@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • new_suppression — A new TypeScript, lint, formatter, or similar suppression was added. Fix the underlying issue or obtain suppression-approved. Paths: gui/src/components/CodexPoolStrategySetting.tsx, gui/src/components/provider-workspace/ProviderAuthPanel.tsx, gui/src/pages/Models.tsx, gui/src/use-app-route-state.ts.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed.

UI screenshot waived by the gui-screenshot-waived label.

@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 18:21
@Wibias Wibias added the suppression-approved Maintainer approved a new type or lint suppression label Aug 12, 2026
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between f8d0c2c and 582eb89.

⛔ Files ignored due to path filters (1)
  • gui/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • .github/workflows/ci.yml
  • gui/.eslint/local-i18n-plugin.ts
  • gui/.oxlintrc.json
  • gui/eslint.config.js
  • gui/package.json
  • gui/src/components/AddProviderModal.tsx
  • gui/src/components/CodexPoolStrategySetting.tsx
  • gui/src/components/combo-workspace-detail-panel.tsx
  • gui/src/components/provider-workspace/ProviderAuthPanel.tsx
  • gui/src/components/provider-workspace/ProviderOverview.tsx
  • gui/src/components/provider-workspace/ProviderSettings.tsx
  • gui/src/hooks/useCodexAccountPool.ts
  • gui/src/hooks/useCodexAutoSwitch.ts
  • gui/src/pages/Debug.tsx
  • gui/src/pages/Models.tsx
  • gui/src/pages/use-dashboard-data.ts
  • gui/src/use-app-route-state.ts
  • scripts/lint-gui-if-changed.ts
💤 Files with no reviewable changes (1)
  • gui/eslint.config.js

Comment thread gui/package.json Outdated
Comment thread gui/src/components/provider-workspace/ProviderSettings.tsx
@github-actions github-actions Bot added intake: hygiene-blocked Deterministic PR hygiene checks failed and removed suppression-approved Maintainer approved a new type or lint suppression labels Aug 12, 2026
@Wibias Wibias added the suppression-approved Maintainer approved a new type or lint suppression label Aug 12, 2026
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026
@Wibias
Wibias marked this pull request as ready for review August 12, 2026 18:38
@github-actions github-actions Bot added intake: hygiene-blocked Deterministic PR hygiene checks failed and removed suppression-approved Maintainer approved a new type or lint suppression labels Aug 12, 2026
@Wibias Wibias added suppression-approved Maintainer approved a new type or lint suppression gui-screenshot-waived Maintainer waiver for false-positive GUI screenshot requirements and removed intake: hygiene-blocked Deterministic PR hygiene checks failed labels Aug 12, 2026
@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 18:38
@Wibias
Wibias marked this pull request as ready for review August 12, 2026 18:38
@Wibias
Wibias force-pushed the chore/oxlint-migration branch from cda3eb6 to f4af179 Compare August 12, 2026 19:30
@github-actions github-actions Bot added intake: hygiene-blocked Deterministic PR hygiene checks failed and removed suppression-approved Maintainer approved a new type or lint suppression labels Aug 12, 2026
@github-actions
github-actions Bot marked this pull request as draft August 12, 2026 19:30
@Wibias Wibias added the suppression-approved Maintainer approved a new type or lint suppression label Aug 12, 2026
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Aug 12, 2026
@github-actions
github-actions Bot marked this pull request as ready for review August 12, 2026 19:34
@Wibias
Wibias merged commit cefec3e into lidge-jun:dev Aug 12, 2026
26 of 28 checks passed
@Wibias
Wibias deleted the chore/oxlint-migration branch August 12, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). gui-screenshot-waived Maintainer waiver for false-positive GUI screenshot requirements suppression-approved Maintainer approved a new type or lint suppression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant