Skip to content

fix(lint): remove useless null initializer in buildBwipOptions#79

Merged
u8array merged 1 commit into
mainfrom
chore/eslint10-no-useless-assignment
May 20, 2026
Merged

fix(lint): remove useless null initializer in buildBwipOptions#79
u8array merged 1 commit into
mainfrom
chore/eslint10-no-useless-assignment

Conversation

@u8array
Copy link
Copy Markdown
Owner

@u8array u8array commented May 20, 2026

No description provided.

ESLint 10's no-useless-assignment rule, enabled via @eslint/js 10's
recommended config (dependabot PR #77), flags the `let opts = null`
in buildBwipOptions as dead. Every reachable case in the switch
assigns opts before `break` and the `default` arm returns early,
so the initial null is never read.

Drops the initializer and the redundant truthiness guard before the
rotation branch (opts is unconditionally assigned by the time we
reach it). Behaviour is unchanged.
@u8array u8array merged commit c490e77 into main May 20, 2026
2 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes a redundant null initializer for the 'opts' variable in 'buildBwipOptions' to comply with ESLint 10's 'no-useless-assignment' rule. The 'opts' type was updated, and a subsequent null check was removed since the variable is now guaranteed to be assigned before use. I have no feedback to provide.

@u8array u8array deleted the chore/eslint10-no-useless-assignment branch May 20, 2026 21:33
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