Skip to content

feat(lint): Enable typescript/no-generated-empty-object-type - #127785

Merged
scttcper merged 1 commit into
masterfrom
scttcper/enable-no-generated-empty-object-type
Oct 16, 2026
Merged

scttcper merged 1 commit into
masterfrom
scttcper/enable-no-generated-empty-object-type

Conversation

@scttcper

@scttcper scttcper commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

New in oxlint 1.86, typescript/no-generated-empty-object-type flags types that quietly resolve to {}. The one hit was Readonly<ValidateColumnTypes> on discover aggregate parameters, which turned the predicate half of the union into {}, so columnTypes accepted anything.

Applying readonly to just the array turned up the detector spans config wrapping apdex's predicate in an array, where nothing would ever call it. It now adapts the predicate to the discover signature instead.

https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-generated-empty-object-type

@scttcper
scttcper added this pull request to stack #127776 October 16, 2026 15:57
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.74% 95.74% ±0%
Typed 142,269 142,273 🟢 +4
Untyped 6,330 6,332 🔴 +2
🔍 2 new type safety issues introduced

Type assertions (as) (2 new)

File Line Detail
static/app/views/detectors/datasetConfig/spans.tsx 64 as ColumnType[] — columnTypes as ColumnType[]
static/app/views/detectors/datasetConfig/spans.tsx 66 as FieldValueType — dataType as FieldValueType

This is informational only and does not block the PR.

@scttcper
scttcper removed this pull request from stack #127776 October 16, 2026 16:08
@scttcper
scttcper added this pull request to stack #127787 October 16, 2026 16:08
@sentry

sentry Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 630 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

Base automatically changed from scttcper/enable-react-incompatible-library to master October 16, 2026 16:31
@scttcper
scttcper force-pushed the scttcper/enable-no-generated-empty-object-type branch from f3058d9 to a03eba5 Compare October 16, 2026 16:31
New in oxlint 1.86, flags types that quietly resolve to `{}`. The one
hit was `Readonly<ValidateColumnTypes>` on discover aggregate
parameters, which mapped the predicate half of the union to `{}` so
`columnTypes` accepted anything.

Applying `readonly` to the array only turned up the detector spans
config wrapping apdex's predicate in an array, where it would never be
called. It now adapts the predicate to the discover signature instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scttcper
scttcper force-pushed the scttcper/enable-no-generated-empty-object-type branch from a03eba5 to b50776a Compare October 16, 2026 16:39
@scttcper
scttcper marked this pull request as ready for review October 16, 2026 16:49
@scttcper
scttcper requested review from a team as code owners October 16, 2026 16:49
@scttcper
scttcper merged commit 0d565a4 into master Oct 16, 2026
93 checks passed
@scttcper
scttcper deleted the scttcper/enable-no-generated-empty-object-type branch October 16, 2026 16:51

This branch was successfully deployed

1 active deployment
Preview — b50776a5 Deployed Oct 16, 2026 by vercel[bot]
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.

2 participants