chore(lint): enforce typescript/no-extraneous-class#25108

merged1
lint-rules/eslint-no-empty-pattern
lint-rules/typescript-no-extraneous-class
opened5d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago

Promote typescript/no-extraneous-class to an error. Reject unnecessary class wrappers, retaining the constructor-only ClipboardItem platform mock with a local explanation.

This PR changes only this rule and its existing call sites. Each changed rule has its own PR.

Stack validation: rebased onto b76a110. The earlier 234-file test run passed, and the cancellation regression test passes after its local exception. Rebased format, lint, Knip, and all 34 affected-package typecheck tasks pass. The final local test rerun and fresh CI are pending.

Model: GPT-6.1 Sol. Harness: Codex.

Checks

24 successful · 12 skipped
All checks passed
8f575f1
Synced from GitHub

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire—5.0 KiB—6.8 KiB✅
CodexThread snapshot wire—3.8 KiB—4.9 KiB✅
CodexLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
CodexLive turn WebSocket decoded—20.9 KiB—29.3 KiB✅
CodexLive turn messages—2—8✅
ClaudeTotal thread wire—5.0 KiB—6.8 KiB✅
ClaudeThread snapshot wire—3.8 KiB—4.9 KiB✅
ClaudeLive turn WebSocket wire—1.2 KiB—2.0 KiB✅
ClaudeLive turn WebSocket decoded—21.2 KiB—29.3 KiB✅
ClaudeLive turn messages—1—8✅

Baseline: unavailable · PR result: 8f575f1 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The PR enables a TypeScript lint rule and adds a targeted inline suppression for an existing test mock, with no product-runtime changes. The added suppression directive falls under the policy requiring human review.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

No code changes detected at 8f575f1. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Added 1 commit

  • chore(lint): enforce typescript/no-extraneous-class8f575f1
Synced from GitHub

Review in Change Stack →

No actionable comments were generated in the recent review.

External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 35dae5cb05d094cdfb7fbff55742ba419f08c587 and 8f575f147b23f1bbccd39df90855ef21d7ef33ec.

External image Files selected for processing: 2
  • apps/desktop/src/preview/Manager.test.ts
  • vite.config.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The Oxlint configuration now treats typescript/no-extraneous-class as an error. The preview manager test suppresses that rule for its constructor-only ClipboardItem mock.

Changes: Oxlint Rule Configuration

Layer / File(s)Summary
Rule and mock exception
vite.config.ts, apps/desktop/src/preview/Manager.test.ts
The lint configuration enables typescript/no-extraneous-class as an error. The test suppresses the rule for its constructor-only ClipboardItem mock.

Priority: External image Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: t3dotgg

Merge Risk: External image Minimal · up to 8f575

No actionable correctness, security, data, or runtime risk is established by these lint-only changes.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Description checkWarningThe description explains the main change, scope, verification results, and agent details. It does not use the required Problem, Change, Scope and approval, and Verification headings. It also does not …Rewrite the description using all template headings. Add the relevant issue or explicit maintainer approval. If no approval is required, explain what capability already exists, what the rule controls, and why the change stays within that ca…
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the lint rule and the main change: enforcing it as an error.
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the main change, scope, verification results, and agent details. It does not use the required Problem, Change, Scope and approval, and Verification headings. It also does not provide issue or maintainer approval information, or explain why this focused configuration needs no prior approval.

Resolution

Rewrite the description using all template headings. Add the relevant issue or explicit maintainer approval. If no approval is required, explain what capability already exists, what the rule controls, and why the change stays within that capability. Keep the verification details and state the pending checks clearly.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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