Skip to content

refactor(sonar): mark component props as read-only (typescript:S6759) - #3448

Merged
setchy merged 1 commit into
mainfrom
sonar/S6759-readonly-props
Oct 17, 2026
Merged

setchy merged 1 commit into
mainfrom
sonar/S6759-readonly-props

Conversation

@setchy

@setchy setchy commented Oct 17, 2026

Copy link
Copy Markdown
Member

Summary

SonarCloud rule typescript:S6759 ("React props should be read-only") flags every function component whose props parameter is typed with a mutable object type. Marking props as read-only documents intent, prevents accidental mutation inside a component, and lets TypeScript catch reassignment.

Changes

Wrap each flagged component's props parameter type in Readonly<…> — 46 signatures across 44 files:

  • src/renderer/components/** — AllRead, Oops, AvatarWithFallback, FieldLabel, RadioGroup, Tooltip, FilterSection, SearchFilterSuggestions, TokenSearchInput, layout (AppLayout, Centered, Contents, EmojiSplash, Page), LoginWithPersonalAccessTokenForm, every metric pill, the notification components, and the primitives (CustomCounter, EmojiText, Footer, Header, HoverGroup, Title).
  • src/renderer/icons/** — BitbucketIcon, GitLabIcon, LogoIcon, ScopeStatusIcon.
  • src/renderer/routes/Accounts.tsx — RecommendedScopesIcon, AlternateScopesIcon.

Type-only refactor; no runtime behaviour changes.

Verification

  • pnpm check (oxlint + oxfmt + tsc --noEmit) — pass
  • pnpm test — 190 test files / 1911 tests passed

SonarCloud issues

https://sonarcloud.io/project/issues?id=gitify-app_gitify&s=IMPACT_RANK&issueStatuses=OPEN&rules=typescript%3AS6759

@github-actions github-actions Bot added the refactor Refactoring of existing feature label Oct 17, 2026
@setchy
setchy marked this pull request as ready for review October 17, 2026 01:55
@setchy
setchy requested a review from afonsojramos as a code owner October 17, 2026 01:55
@setchy
setchy merged commit f7617e7 into main Oct 17, 2026
18 checks passed
@setchy
setchy deleted the sonar/S6759-readonly-props branch October 17, 2026 01:55
@github-actions github-actions Bot added this to the Release 7.10.0 milestone Oct 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in Gitify v7.10.0! 🎉

Downloads for macOS, Windows, and Linux are available on the release page.

Thanks for helping make Gitify better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of existing feature

Development

Successfully merging this pull request may close these issues.

1 participant