Skip to content

ref(lint): Enable no-unnecessary-type-assertion - #2125

Merged
betegon merged 3 commits into
mainfrom
josh/lint-no-unnecessary-type-assertion
Nov 10, 2026
Merged

betegon merged 3 commits into
mainfrom
josh/lint-no-unnecessary-type-assertion

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Turns on typescript/no-unnecessary-type-assertion and removes the casts it flags, almost all through oxlint's autofix.

Logger and toolkit-core now enable noUncheckedIndexedAccess, matching how the CLI already typechecks their source, so the lint and the typecheck agree on which assertions are needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoshuaKGoldberg

Copy link
Copy Markdown
Member Author

@cursor review

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 10, 2026 8:45pm UTC

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 50981e3. Configure here.

@JoshuaKGoldberg
JoshuaKGoldberg marked this pull request as ready for review November 10, 2026 14:19
Fixes new assertion hits from main and annotates an eval array so the rule agrees whether or not workspace packages are built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: bete <28983162+betegon@users.noreply.github.com>
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 10, 2026
@betegon
betegon enabled auto-merge (squash) November 10, 2026 20:48
@betegon
betegon merged commit aa54af1 into main Nov 10, 2026
45 checks passed
@betegon
betegon deleted the josh/lint-no-unnecessary-type-assertion branch November 10, 2026 20:55
sentry-junior Bot added a commit that referenced this pull request Nov 10, 2026
Resolves the stdio-setup.tsx modify/delete conflict by taking main's deletion (replaced by cli-setup.tsx in #1981), and drops an unnecessary `as typeof fetch` in sentry-client.test.ts that #2152 added and that fails the no-unnecessary-type-assertion rule enabled in #2125.

This branch was successfully deployed

2 active deployments
Preview — 008b7e7d Deployed Nov 10, 2026 by vercel[bot]
Actions — 008b7e7d Deployed Nov 10, 2026 by sentry-junior[bot] via eval #1782
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants