Skip to content

ref(eslint): enable no-unsafe-return for scraps#115722

Merged
TkDodo merged 1 commit into
masterfrom
tkdodo/ref/no-unsafe-return
May 18, 2026
Merged

ref(eslint): enable no-unsafe-return for scraps#115722
TkDodo merged 1 commit into
masterfrom
tkdodo/ref/no-unsafe-return

Conversation

@TkDodo
Copy link
Copy Markdown
Collaborator

@TkDodo TkDodo commented May 18, 2026

No description provided.

@TkDodo
Copy link
Copy Markdown
Collaborator Author

TkDodo commented May 18, 2026

bugbot run

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 18, 2026
showTrailingItems={!!trailingItems}
>
{Array.isArray(expand) ? expand.map(item => item) : expand}
{expand}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this was a no-op: React can render arrays just fine as children

Comment on lines +324 to 325
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
() => [...collection].map(({key, props: itemProps}) => ({key, ...itemProps})),
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sadly, useCollection just returns any for collection.props :/

@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.52% 93.54% 🟢 +0.02%
Typed 135,444 135,476 🟢 +32
Untyped 9,388 9,357 🟢 -31
🔍 4 new type safety issues introduced

any-typed symbols (2 new)

File Line Detail
static/app/components/core/select/select.tsx 502 anyProps (var)
static/app/components/core/select/select.tsx 502 props as any (as-any)

Type assertions (as) (2 new)

File Line Detail
static/app/components/core/layout/styles.tsx 235 as Tprop[activeBreakpoint] as T
static/app/components/core/select/select.tsx 632 as neverreplacedComponents as never

This is informational only and does not block the PR.

Copy link
Copy Markdown
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.

✅ 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 14eed8e. Configure here.

@TkDodo TkDodo marked this pull request as ready for review May 18, 2026 14:41
@TkDodo TkDodo requested review from a team as code owners May 18, 2026 14:41
@TkDodo TkDodo merged commit e491c3a into master May 18, 2026
72 checks passed
@TkDodo TkDodo deleted the tkdodo/ref/no-unsafe-return branch May 18, 2026 14:50
Comment on lines +533 to +535
ref: el => {
triggerRef.current = el;
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
ref: el => {
triggerRef.current = el;
},
ref: el => void (triggerRef.current = el),

not really suggesting this, but you can tell typescript to ignore the return type with void

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.

3 participants