Skip to content

chore(deps): bump typescript-eslint to 8.56.1#109312

Merged
JoshuaKGoldberg merged 1 commit intomasterfrom
typescript-eslint-8.56.1
Feb 27, 2026
Merged

chore(deps): bump typescript-eslint to 8.56.1#109312
JoshuaKGoldberg merged 1 commit intomasterfrom
typescript-eslint-8.56.1

Conversation

@JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Feb 25, 2026

I noticed while working on #109310 that the latest version of @typescript-eslint/prefer-optional-chain wasn't being used. Some code snippets like this weren't being reported:

if (apple && apple.banana === "cherry") {

That was fixed by typescript-eslint/typescript-eslint#11533. This PR bumps typescript-eslint to the latest version and fixes new lint rule reports. It was mostly prefer-optional-chain reports; others are noted inline.

Fixes https://linear.app/getsentry/issue/ENG-6929/bump-typescript-eslint-to-855

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 25, 2026
exports: moduleExports,
},
};
return callback(null, `export default ${JSON.stringify(typeLoaderResult)}`);
Copy link
Member Author

@JoshuaKGoldberg JoshuaKGoldberg Feb 25, 2026

Choose a reason for hiding this comment

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

@typescript-eslint/await-thenable: neither extractComponentProps nor extractModuleExports return a Promise. There's no need to Promise.all them. This is a case newly caught by typescript-eslint/typescript-eslint#11611.

Technically, this is a behavior change. If the code throws an error I think there might be a difference in error handling. It looks safe but I don't have enough context yet in the code to feel safe making that statement. Because this is "just" stories I'll go forward with requesting review.

options={(activePlan.planCategories[category] || []).map(
(level: {events: {toLocaleString: () => any}}) => ({
// eslint-disable-next-line @typescript-eslint/no-base-to-string
label: level.events.toLocaleString(),
Copy link
Member Author

Choose a reason for hiding this comment

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

@typescript-eslint/no-base-to-string: this false positive was accidentally fixed in typescript-eslint/typescript-eslint#11901. TIL! 😄

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review February 25, 2026 13:56
@JoshuaKGoldberg JoshuaKGoldberg requested review from a team as code owners February 25, 2026 13:56
@JoshuaKGoldberg
Copy link
Member Author

GitHub UI screenshot: JoshuaKGoldberg requested review from alerts-notifications, alerts-create-issues, coding-workflows, crons, dashboards, data-browsing, ecosystem, explore, machine-learning-ai, profiling, replay-frontend, design-engineering, issue-workflow, owners-js-deps and telemetry-experience as code owners now

👌

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

metricAlertQuota &&
metricAlertQuota.detectorLimit === metricAlertQuota.detectorCount + 1
) {
if (metricAlertQuota?.detectorLimit === metricAlertQuota.detectorCount + 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Asymmetric optional chaining could crash on right operand

Low Severity

The prefer-optional-chain lint fix transformed metricAlertQuota && metricAlertQuota.detectorLimit === metricAlertQuota.detectorCount + 1 into metricAlertQuota?.detectorLimit === metricAlertQuota.detectorCount + 1. Unlike &&, the === operator always evaluates both sides — so optional chaining on the left doesn't protect the bare metricAlertQuota.detectorCount access on the right from throwing if the value were ever nullish. The original && short-circuited the entire expression safely. While useMetricDetectorLimit currently always returns a non-null object, this pattern is inconsistent and fragile.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

I think Cursor is wrong here. From what I can tell, file and the codebase around it doesn't do any weird unusual logic that would cause property accesses on metricAlertQuota to have side effects (e.g. computed getters, null!/undefined! values). But someone please tell me if I'm wrong?!

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look like it's necessary to have the optional check here anymore either. It seems like metricAlertQuota should always be defined. Drilling into the hook shows that these fields are always supplied. imo yes, I think Cursor's wrong and it's confused thinking that metricAlertQuota can be null/undefined when it can't be

I see there's some code above that does the same check, I think it's fine if we ignore it but I think either we should link our optional chaining when it's not necessary or just fix this one case, but a linting rule would be good 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

Confirmed! @narsaynorath showed me how to get to this component. For posterity:

  1. It's under /monitors/new, which you need to be in the alpha rollout for
  2. In detectorTypeForm.tsx, change canCreateMetricDetector to false
  3. In this file, set metricAlertQuota.hasReachedLimit = true;

@JoshuaKGoldberg JoshuaKGoldberg merged commit 36e30e7 into master Feb 27, 2026
80 of 82 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the typescript-eslint-8.56.1 branch February 27, 2026 12:52
@linear
Copy link

linear bot commented Mar 2, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants