Skip to content

revert(no-unnecessary-type-arguments): drop inference reporting#892

Merged
graphite-app[bot] merged 1 commit into
mainfrom
c/04-16-revert_no-unnecessary-type-arguments_inference-reporting
Apr 16, 2026
Merged

revert(no-unnecessary-type-arguments): drop inference reporting#892
graphite-app[bot] merged 1 commit into
mainfrom
c/04-16-revert_no-unnecessary-type-arguments_inference-reporting

Conversation

@camc314

@camc314 camc314 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings April 16, 2026 11:40

camc314 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@camc314 camc314 force-pushed the c/04-16-revert_no-unnecessary-type-arguments_inference-reporting branch from 77f1310 to 7c4ad8d Compare April 16, 2026 12:15
@camc314 camc314 requested a review from Copilot April 16, 2026 12:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

camc314 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

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
@graphite-app graphite-app Bot force-pushed the c/04-16-revert_no-unnecessary-type-arguments_inference-reporting branch from 7c4ad8d to 9cb95a8 Compare April 16, 2026 12:23
@camc314 camc314 self-assigned this Apr 16, 2026
@graphite-app graphite-app Bot merged commit 9cb95a8 into main Apr 16, 2026
8 checks passed
@graphite-app graphite-app Bot removed the 0-merge label Apr 16, 2026
@graphite-app graphite-app Bot deleted the c/04-16-revert_no-unnecessary-type-arguments_inference-reporting branch April 16, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants