-
-
Notifications
You must be signed in to change notification settings - Fork 791
fix(lint): update rule diagnostic message for useUnifiedTypeSignature
#8378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(lint): update rule diagnostic message for useUnifiedTypeSignature
#8378
Conversation
overloads are not inherently hard to maintain by themselves - it's having multiple redundant ones that is undesirable
🦋 Changeset detectedLatest commit: 21892d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
useUnifiedTypeSignatureuseUnifiedTypeSignature
WalkthroughThe linter rule Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
CodSpeed Performance ReportMerging #8378 will not alter performanceComparing Summary
Footnotes
|
ematipico
left a comment
There was a problem hiding this 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
|
okay. A bit ironic that the changeset is longer than the actual change itself |
useUnifiedTypeSignatureuseUnifiedTypeSignature
There was a problem hiding this 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
📒 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 usingjust 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 adiffcode 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)
useUnifiedTypeSignatureuseUnifiedTypeSignature
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:
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)