Skip to content

refactor(sonar): mark callback members as readonly (typescript:S2933) - #237

Merged
setchy merged 1 commit into
mainfrom
fix/sonar/typescript-S2933-followup
Oct 7, 2026
Merged

setchy merged 1 commit into
mainfrom
fix/sonar/typescript-S2933-followup

Conversation

@setchy

@setchy setchy commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

Resolves the typescript:S2933 finding in src/Menubar.ts. Five arrow-function class members are bound once and never reassigned, so they can be readonly. This is a no-op at runtime and just documents that intent; it follows the same pattern used for the constructor-only fields in #218.

Rule: "Class members should be marked read-only".

Changes

  • src/Menubar.ts: mark the following members readonly:
    • positionWindow
    • clicked
    • onAppActivate
    • onBeforeQuit
    • onAppReady

Verification

  • pnpm typecheck — clean
  • pnpm lint:check — clean
  • pnpm test — 129/129 passing

Findings

@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@setchy
setchy marked this pull request as ready for review October 7, 2026 13:40
@setchy
setchy requested a review from afonsojramos as a code owner October 7, 2026 13:40
@setchy
setchy merged commit 294ef9b into main Oct 7, 2026
29 checks passed
@setchy
setchy deleted the fix/sonar/typescript-S2933-followup branch October 7, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant