Skip to content

chore: remove unused React imports and gate ESLint in CI - #385

Merged
GOODBOY008 merged 2 commits into
GOODBOY008:mainfrom
sunxiaobin89:chore/lint-unused-react-imports
Dec 3, 2026
Merged

GOODBOY008 merged 2 commits into
GOODBOY008:mainfrom
sunxiaobin89:chore/lint-unused-react-imports

Conversation

@sunxiaobin89

Copy link
Copy Markdown
Contributor

Summary

  • Remove the twelve unused default React imports flagged by pnpm lint (@typescript-eslint/no-unused-vars). React 19's automatic JSX runtime means these files only need the named hooks they already import.
  • Run pnpm lint in the test workflow so future unused imports / lint errors fail CI instead of landing silently.

Why

pnpm lint exited with 12 errors on main, so the documented lint gate (AGENTS.md) was red but invisible: CI never invoked ESLint. The 173 remaining warnings are intentional no-unsafe-* (Tauri invoke()) and stay non-blocking — ESLint only exits non-zero on errors.

Test plan

  • pnpm lint → 0 errors, 173 warnings (exit 0)
  • pnpm exec tsc --noEmit → pass
  • pnpm build → pass
  • pnpm test → 2181 passed / 16 skipped
  • Ran the debug app from this branch with Vite HMR: all touched components hot-reloaded, connected SSH session, split panes and log panel stayed functional

No runtime behavior changes; the edits only delete unused import statements.

React 19's automatic JSX runtime no longer needs the default React import
in files that only use JSX. ESLint flagged the twelve leftovers, so pnpm
lint exited non-zero even though the build was clean.

No behavior change: tsc --noEmit, vite build, and the full Vitest suite
(2181 tests) still pass, and the running app hot-reloaded without errors.
pnpm lint already exits non-zero on errors, but CI never invoked it, so
regressions like unused imports could land unnoticed. Add the step next
to the existing frontend test/build gates; the 173 remaining
no-unsafe-* warnings stay non-blocking because lint only fails on
errors.
@GOODBOY008

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T02:38:09.465834Z 64d23cc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 64d23ccdf1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@GOODBOY008
GOODBOY008 merged commit 282d6ea into GOODBOY008:main Dec 3, 2026
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.

2 participants