revert(no-unnecessary-type-arguments): drop inference reporting#892
Conversation
How to use the Graphite Merge QueueAdd the label 0-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Reverts the previously-ported “inferred type reporting” behavior in no-unnecessary-type-arguments to match upstream (typescript-eslint#12199), while keeping the later default-type equivalence behavior (from #862).
Changes:
- Remove “can be inferred” diagnostics/fixes and only report when a type argument matches the type parameter’s default type.
- Consolidate/rename the diagnostic message id to
unnecessaryTypeParameter. - Update unit tests and both rule-tester + e2e snapshots to reflect the reverted behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/rules/no_unnecessary_type_arguments/no_unnecessary_type_arguments.go | Drops inference-based checking and reports only default-type matches using the unified message id. |
| internal/rules/no_unnecessary_type_arguments/no_unnecessary_type_arguments_test.go | Removes inference-reporting invalid cases, adds regression coverage ensuring inference reporting stays disabled, updates expected message ids. |
| internal/rule_tester/snapshots/no-unnecessary-type-arguments.snap | Snapshot updates for removed inference diagnostics and new message id. |
| e2e/snapshots/snapshot.test.ts.snap | E2E snapshot updates to remove the inference diagnostic and rename default-value diagnostic id. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
77f1310 to
7c4ad8d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
Align with typescript-eslint/typescript-eslint#12199 by reverting the #853 port of inferred-type reporting. Keep the later default-type equivalence fix from #862. Validation: - go test ./internal/rules/no_unnecessary_type_arguments/... - cd e2e && pnpm test --run snapshot.test.ts fixes oxc-project/oxc#21464 fixes #875 fixes oxc-project/oxc#21096 fises oxc-project/oxc#20933
7c4ad8d to
9cb95a8
Compare

Align with typescript-eslint/typescript-eslint#12199 by reverting the #853 port of inferred-type reporting.
Keep the later default-type equivalence fix from #862.
Validation:
fixes oxc-project/oxc#21464
fixes #875
fixes oxc-project/oxc#21096
fises oxc-project/oxc#20933