Skip to content

Conversation

@Bertie690
Copy link
Contributor

@Bertie690 Bertie690 commented Dec 7, 2025

Summary

Overloads are not inherently hard to maintain by themselves - it's
having multiple redundant ones that is undesirable.
The rule message effectively suggested that overloads in general are a maintenance burden, which is both out of scope of the rule and simply not true.

For instance, there are overload-specific things you cannot do with union types:

// accepts a heterogenous array of nums or strings, but not mixed
function foo(...xs: string[]): void;
function foo(...xs: number[]): void;

The rule flags multiple similar overload signatures, so that is what we should report in the diagnostic - nothing more, nothing less.

Test Plan

Updated the spec tests to use new wording.

Docs

N/A (it's literally changing a single string cmon)

overloads are not inherently hard to maintain by themselves - it's
having multiple redundant ones that is undesirable
@changeset-bot
Copy link

changeset-bot bot commented Dec 7, 2025

🦋 Changeset detected

Latest commit: 21892d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Bertie690 Bertie690 changed the title docs: update rule diagnostic message for useUnifiedTypeSignature fix(lint): update rule diagnostic message for useUnifiedTypeSignature Dec 7, 2025
@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Dec 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Walkthrough

The linter rule use_unified_type_signatures message was updated to specify that multiple similar overload signatures are hard to read and maintain, replacing a more generic statement about overload signatures being problematic. A changeset entry was added to mark a patch release for the package.

Suggested reviewers

  • dyc3
  • ematipico

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset, explaining the rationale for narrowing the rule's message and providing context about when overloads are necessary versus when they're redundant.
Title check ✅ Passed The title accurately describes the main change: updating the diagnostic message for the useUnifiedTypeSignature lint rule.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 7, 2025

CodSpeed Performance Report

Merging #8378 will not alter performance

Comparing Bertie690:unified-signature-diagnostic (21892d4) with main (d407efb)1

Summary

✅ 58 untouched
⏩ 95 skipped2

Footnotes

  1. No successful run was found on main (8f36051) during the generation of this report, so d407efb was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 95 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.

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Could you add a changeset? This is still a user facing change we need to track

@Bertie690
Copy link
Contributor Author

Bertie690 commented Dec 7, 2025

okay.

A bit ironic that the changeset is longer than the actual change itself

@Bertie690 Bertie690 changed the title fix(lint): update rule diagnostic message for useUnifiedTypeSignature fix(lint): clarify rule diagnostic message for useUnifiedTypeSignature Dec 7, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/eleven-meals-brake.md (1)

5-7: Add an example demonstrating the clarified diagnostic message.

Per the coding guidelines for changeset entries on rule changes, please demonstrate what the diagnostic message now says. Show a concrete before-and-after example or quote the actual updated message text so users understand the specific change.

Also, use "and" instead of the ampersand ("&") for formal documentation.

Consider revising the description to something like:

Clarify diagnostic message for `lint/style/useUnifiedTypeSignatures`.

The rule now reports: "These overload signatures are very similar and hard to read and maintain." instead of implying that all overload signatures are problematic. This allows valid overload patterns (e.g., varargs of different types) to pass without flagging.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 438a622 and 21892d4.

📒 Files selected for processing (1)
  • .changeset/eleven-meals-brake.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/**/*.md: Create changesets for user-facing changes using just new-changeset; use headers with #### or ##### only; keep descriptions concise (1-3 sentences) and focus on user-facing changes
Use past tense when describing what was done ('Added new feature'), present tense when describing Biome behavior ('Biome now supports'); end sentences with a full stop
For new lint rules, show an example of an invalid case in an inline code snippet or code block; for rule changes, demonstrate what is now invalid or valid; for formatter changes, use a diff code block

Files:

  • .changeset/eleven-meals-brake.md
🧠 Learnings (3)
📚 Learning: 2025-11-28T09:08:10.091Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-28T09:08:10.091Z
Learning: Applies to .changeset/**/*.md : Create changesets for user-facing changes using `just new-changeset`; use headers with `####` or `#####` only; keep descriptions concise (1-3 sentences) and focus on user-facing changes

Applied to files:

  • .changeset/eleven-meals-brake.md
📚 Learning: 2025-11-28T09:08:10.091Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-28T09:08:10.091Z
Learning: Applies to .changeset/**/*.md : For new lint rules, show an example of an invalid case in an inline code snippet or code block; for rule changes, demonstrate what is now invalid or valid; for formatter changes, use a `diff` code block

Applied to files:

  • .changeset/eleven-meals-brake.md
📚 Learning: 2025-11-27T23:04:02.022Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-11-27T23:04:02.022Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Rule diagnostics must explain to the user what the error is, why it is triggered, and what should be done to fix it following the three pillars: (1) what the error is, (2) why the error is triggered, (3) what the user should do

Applied to files:

  • .changeset/eleven-meals-brake.md
🪛 LanguageTool
.changeset/eleven-meals-brake.md

[style] ~7-~7: To elevate your writing, try using a synonym here.
Context: ...tiple similar overload signatures are hard to read & maintain, as opposed to overl...

(HARD_TO)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Bench (biome_js_parser)

@Bertie690 Bertie690 changed the title fix(lint): clarify rule diagnostic message for useUnifiedTypeSignature fix(lint): update rule diagnostic message for useUnifiedTypeSignature Dec 7, 2025
@ematipico ematipico merged commit cc2a62e into biomejs:main Dec 7, 2025
18 of 21 checks passed
@github-actions github-actions bot mentioned this pull request Dec 7, 2025
@Bertie690 Bertie690 deleted the unified-signature-diagnostic branch December 7, 2025 13:32
This was referenced Dec 15, 2025
l0ngvh pushed a commit to l0ngvh/biome that referenced this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants