Skip to content

ref(flamegraph): Rename STACK_TO_COLOR to stackToColor for ESLint compliance - #121924

Open
sentry[bot] wants to merge 3 commits into
masterfrom
seer/ref/flamegraph-stack-to-color-rename
Open

ref(flamegraph): Rename STACK_TO_COLOR to stackToColor for ESLint compliance#121924
sentry[bot] wants to merge 3 commits into
masterfrom
seer/ref/flamegraph-stack-to-color-rename

Conversation

@sentry

@sentry sentry Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This PR renames the STACK_TO_COLOR property within the flamegraph theme to stackToColor.

Why this change?
The previous STACK_TO_COLOR naming convention violated the no-capitalized-function-calls ESLint rule, which flags function calls where the callee name starts with a capital letter (conventionally reserved for constructors). The flamegraph theme's COLORS object used an ALL_CAPS convention for both constant values and callable functions, leading to this linter error when STACK_TO_COLOR was invoked.

What was changed?

  • Updated the FlamegraphTheme type definition in flamegraphTheme.tsx.
  • Renamed the property in both light and dark theme implementations in flamegraphTheme.tsx.
  • Adjusted the return type annotation in makeStackToColor in utils/profiling/colors/utils.tsx.
  • Updated all call sites in flamegraphRenderer.tsx and aggregateFlamegraphTreeTable.tsx.
  • Modified the test mock in flamegraphRendererWebGL.spec.tsx to reflect the new name and removed the now-unnecessary @ts-expect-error comment.

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-1QB

@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