Skip to content

kaizen: remove redundant eslint-disable comments in defineMiddleware#178

Open
gabrypavanello wants to merge 1 commit intomainfrom
kaizen/2026-02-22-clean
Open

kaizen: remove redundant eslint-disable comments in defineMiddleware#178
gabrypavanello wants to merge 1 commit intomainfrom
kaizen/2026-02-22-clean

Conversation

@gabrypavanello
Copy link
Contributor

What

Removed 3 redundant // eslint-disable-next-line @typescript-eslint/no-confusing-void-expression comments from packages/core/src/middleware/defineMiddleware.ts.

Why

The rule @typescript-eslint/no-confusing-void-expression is set to "off" globally in eslint.config.js (line 102). The inline suppression comments were added before the global override was introduced and are now dead weight.

Changes

  • packages/core/src/middleware/defineMiddleware.ts: -3 lines (comment-only)

Risk

Zero — comment-only cleanup, no behaviour change.

Verification

  • pnpm run build — all 11 projects built
  • pnpm run test — 74/74 tests passed

The @typescript-eslint/no-confusing-void-expression rule is globally set
to 'off' in eslint.config.js (line 102). Three inline disable comments
in defineMiddleware.ts were therefore redundant dead weight.

No behaviour change — comment-only cleanup.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Removed linting directives to improve code clarity. No changes to functionality or user experience.

Walkthrough

Removal of three eslint-disable-next-line comments that suppress TypeScript void-expression warnings from next() calls in middleware definition logic, with no runtime behavior changes.

Changes

Cohort / File(s) Summary
Linter Directive Cleanup
packages/core/src/middleware/defineMiddleware.ts
Removed three @typescript-eslint/no-confusing-void-expression eslint directives from around next() call invocations without altering control flow or logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing redundant eslint-disable comments from defineMiddleware.
Description check ✅ Passed The description is well-structured and directly related to the changeset, explaining what was removed, why it was unnecessary, and providing verification that tests pass.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kaizen/2026-02-22-clean

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

@claude
Copy link
Contributor

claude bot commented Feb 22, 2026

Code Review

Summary: Removes 3 redundant eslint-disable-next-line @typescript-eslint/no-confusing-void-expression comments from packages/core/src/middleware/defineMiddleware.ts.


Verification

Confirmed that eslint.config.js line 102 globally disables the rule:

"@typescript-eslint/no-confusing-void-expression": "off", // Allow void returns

All three removed comments suppressed the same rule that is already off globally, making them dead weight. The PR description's claim of "zero risk" holds — this is purely a comment-only cleanup with no behavioral or functional change.


Findings

Area Status
Correctness The inline disables were genuinely redundant
Behavior change None
Type safety Unaffected
Test coverage No behavior changed; existing 74/74 passing tests remain sufficient
Security N/A

Suggestions

One optional improvement to consider: the PR could also check whether similar redundant suppression comments exist elsewhere in the codebase for the same rule, and clean those up in the same pass. A quick search:

grep -r "eslint-disable.*no-confusing-void-expression" packages/

If there are other instances, folding them into this PR would make the cleanup complete. If there are none, this PR already covers everything.


Verdict: LGTM. Clean, targeted, low-risk kaizen. Ready to merge once CI passes.

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.

1 participant