Skip to content

fix(linter/unicorn/no-useless-undefined): narrow return type exemptions - #29000

Merged
graphite-app[bot] merged 1 commit into
mainfrom
codex/fix-28979
Nov 9, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
codex/fix-28979

Conversation

@camc314

@camc314 camc314 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Match Unicorn's return-type exemptions: report return undefined for void and undefined return types, and check initializers and defaults regardless of the enclosing return type. Keep annotated concise arrow bodies and other annotated returns exempt.

Preserve TypeScript parameter optionality when removing defaults. Withhold fixes for unannotated TypeScript parameters, parameter properties, TypeScript destructuring defaults, and var initializers to preserve types and binding resets; keep reporting them. Exclude using declarations, whose initializers are required. Regression coverage includes defaults before required parameters and JavaScript fixes.

Fixes #28979

Copilot AI balanced review requested due to automatic review settings November 7, 2026 18:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: βœ… Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-11-08T00:39:49.065072Z fbb3f9b New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@github-actions github-actions Bot added the A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details label Nov 7, 2026
@codspeed

codspeed Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

βœ… 5 untouched benchmarks
⏩ 101 skipped benchmarks1


Comparing codex/fix-28979 (fbb3f9b) with main (fe66fa7)2

Open in CodSpeed

Footnotes

  1. 101 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (0f861ea) during the generation of this report, so fe66fa7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 7, 2026

camc314 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Nov 7, 10:24 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 7, 10:24 PM UTC: camc314 added this pull request to the Graphite merge queue.
  • Nov 7, 10:25 PM UTC: The Graphite merge queue couldn't merge this PR because it had merge conflicts.
  • Nov 9, 9:12 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 9, 9:12 AM UTC: camc314 added this pull request to the Graphite merge queue.
  • Nov 9, 9:17 AM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Nov 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a505456e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fab095abf1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d12ce74629

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2bcec8da9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bb4cc3d24

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78dc07b923

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 9, 2026
…ns (#29000)

Match Unicorn's return-type exemptions: report `return undefined` for `void` and `undefined` return types, and check initializers and defaults regardless of the enclosing return type. Keep annotated concise arrow bodies and other annotated returns exempt.

Preserve TypeScript parameter optionality when removing defaults. Withhold fixes for unannotated TypeScript parameters, parameter properties, TypeScript destructuring defaults, and `var` initializers to preserve types and binding resets; keep reporting them. Exclude `using` declarations, whose initializers are required. Regression coverage includes defaults before required parameters and JavaScript fixes.

Fixes #28979
@graphite-app
graphite-app Bot merged commit 4630fe4 into main Nov 9, 2026
31 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Nov 9, 2026
@graphite-app
graphite-app Bot deleted the codex/fix-28979 branch November 9, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter (oxlint): rules, config, diagnostics, fixes. Add L-* labels for details

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter(unicorn/no-useless-undefined): any function return type suppresses reports that upstream makes

2 participants