Skip to content

fix: resolve lint:packages warnings blocking CI (--max-warnings 0) - #1012

Merged
davedbase merged 2 commits into
solidjs-community:mainfrom
davedbase:patch/lint-max-warnings-fixes
Aug 16, 2026
Merged

fix: resolve lint:packages warnings blocking CI (--max-warnings 0)#1012
davedbase merged 2 commits into
solidjs-community:mainfrom
davedbase:patch/lint-max-warnings-fixes

Conversation

@davedbase

@davedbase davedbase commented Aug 16, 2026

Copy link
Copy Markdown
Member
  • memo: two let bindings that are never reassigned (prefer-const)
  • websocket: ws?.removeEventListener flagged as an unnecessary optional chain by @typescript-eslint/no-unnecessary-condition — this is a false positive, ws is genuinely undefined on the first getWS() call (declared without an initializer), TS's declared type just doesn't reflect that. Suppressed with the same eslint-disable pattern already used one line below for the identical false positive, rather than removing the ?. (which would throw on first connect).

No behavior change; verified via full memo/websocket test suites.

Summary by CodeRabbit

  • Refactor
    • Improved internal code clarity and linting documentation without changing observable behavior.

- memo: two `let` bindings that are never reassigned (prefer-const)
- websocket: ws?.removeEventListener flagged as an unnecessary optional
  chain by @typescript-eslint/no-unnecessary-condition — this is a false
  positive, ws is genuinely undefined on the first getWS() call (declared
  without an initializer), TS's declared type just doesn't reflect that.
  Suppressed with the same eslint-disable pattern already used one line
  below for the identical false positive, rather than removing the `?.`
  (which would throw on first connect).

No behavior change; verified via full memo/websocket test suites.
@changeset-bot

changeset-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 976fe62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6808b0c6-1069-4de2-ba93-2304ceafb5d5

📥 Commits

Reviewing files that changed from the base of the PR and between 85e6167 and 976fe62.

📒 Files selected for processing (2)
  • packages/memo/src/index.ts
  • packages/websocket/src/index.ts

Included review availability: Your plan includes up to 4 reviews per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The changes replace two mutable memo bindings with immutable bindings and add an ESLint suppression comment for the initial undefined WebSocket reference. Runtime behavior remains unchanged.

Changes

Memo declaration cleanup

Layer / File(s) Summary
Make memo locals immutable
packages/memo/src/index.ts
The memo calculation result and captured memo reference now use const. Memo state updates and cleanup behavior remain unchanged.

WebSocket lint clarification

Layer / File(s) Summary
Explain initial WebSocket state
packages/websocket/src/index.ts
The getWS code documents the intentional potentially undefined ws reference during the first call.

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

Merge Risk: ⚪ Minimal · up to 976fe

This localized lint-only change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: fixing lint warnings that block CI with --max-warnings 0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 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.

@davedbase
davedbase merged commit c7b608c into solidjs-community:main Aug 16, 2026
5 of 6 checks passed
@davedbase
davedbase deleted the patch/lint-max-warnings-fixes branch August 16, 2026 14:59
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