Skip to content

fix(coding-conventions): Alias Symbol to satisfy no-capitalized-function-calls rule - #121923

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/coding-conventions-symbol-alias
Open

fix(coding-conventions): Alias Symbol to satisfy no-capitalized-function-calls rule#121923
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/coding-conventions-symbol-alias

Conversation

@sentry

@sentry sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the no-capitalized-function-calls warning reported for Symbol('hoverOverlay') in static/app/utils/useHoverOverlay.tsx.

The React Compiler's CapitalizedCalls diagnostic (and its corresponding ESLint rule) flags capitalized function calls as potential React components being invoked incorrectly. Symbol is a JavaScript built-in, not a React component, and cannot be renamed or called with new.

To resolve this, a module-scoped lowercase alias createToken = Symbol has been introduced. The call site now uses createToken('hoverOverlay'), which satisfies the linting rule while maintaining the original runtime behavior. This approach aligns with the project's convention guidance for handling capitalized built-ins that cannot be renamed.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes CODING-CONVENTIONS-3QG

@sentry
sentry Bot requested a review from a team as a code owner August 13, 2026 01:42
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 13, 2026
@ryan953 ryan953 added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant