Skip to content

chore: add rule source for noNestedTernary#9927

Merged
dyc3 merged 1 commit intomainfrom
dyc3/noNestedTernary-rule-soource
Apr 11, 2026
Merged

chore: add rule source for noNestedTernary#9927
dyc3 merged 1 commit intomainfrom
dyc3/noNestedTernary-rule-soource

Conversation

@dyc3
Copy link
Copy Markdown
Contributor

@dyc3 dyc3 commented Apr 11, 2026

Summary

Does what it says on the tin. eslint unicorn has a rule that does the same thing, but behaves slightly differently.

Test Plan

ci should be green

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 11, 2026

🦋 Changeset detected

Latest commit: b7a63c4

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

@github-actions github-actions Bot added A-CLI Area: CLI A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Apr 11, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Walkthrough

This PR adds a changeset file and updates the noNestedTernary lint rule to acknowledge an additional upstream source: eslint-plugin-unicorn's no-nested-ternary rule. The existing eslint source attribution is retained, while the unicorn variant is marked as an inspiration. No changes to the rule's logic or diagnostics.

Possibly related PRs

Suggested labels

A-Linter, L-JavaScript

Suggested reviewers

  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding rule source attribution for the noNestedTernary lint rule.
Description check ✅ Passed The description explains the motivation (ESLint Unicorn has a similar rule with different behaviour) and links to test plan, though somewhat brief.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dyc3/noNestedTernary-rule-soource

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

Copy link
Copy Markdown
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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/large-buses-stick.md:
- Line 5: The sentence "Added eslint-plugin-unicorn's `no-nested-ternary` as a
rule source for
[`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/)" in the
changeset description is missing a trailing period; edit that line in
.changeset/large-buses-stick.md to append a full stop at the end of the sentence
so it conforms to the changeset punctuation guideline.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a1ec545d-734f-4b9b-b092-0c4320f89c5a

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0e611 and b7a63c4.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs is excluded by !**/migrate/eslint_any_rule_to_biome.rs and included by **
📒 Files selected for processing (2)
  • .changeset/large-buses-stick.md
  • crates/biome_js_analyze/src/lint/style/no_nested_ternary.rs

"@biomejs/biome": patch
---

Added eslint-plugin-unicorn's `no-nested-ternary` as a rule source for [`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/)
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.

⚠️ Potential issue | 🟡 Minor

Missing full stop.

As per coding guidelines, every sentence in changeset descriptions should end with a full stop (period).

Proposed fix
-Added eslint-plugin-unicorn's `no-nested-ternary` as a rule source for [`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/)
+Added eslint-plugin-unicorn's `no-nested-ternary` as a rule source for [`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/large-buses-stick.md at line 5, The sentence "Added
eslint-plugin-unicorn's `no-nested-ternary` as a rule source for
[`noNestedTernary`](https://biomejs.dev/linter/rules/no-nested-ternary/)" in the
changeset description is missing a trailing period; edit that line in
.changeset/large-buses-stick.md to append a full stop at the end of the sentence
so it conforms to the changeset punctuation guideline.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 11, 2026

Merging this PR will not alter performance

✅ 58 untouched benchmarks
⏩ 196 skipped benchmarks1


Comparing dyc3/noNestedTernary-rule-soource (b7a63c4) with main (0d0e611)

Open in CodSpeed

Footnotes

  1. 196 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.

@dyc3 dyc3 merged commit 7974ab7 into main Apr 11, 2026
19 checks passed
@dyc3 dyc3 deleted the dyc3/noNestedTernary-rule-soource branch April 11, 2026 17:51
@github-actions github-actions Bot mentioned this pull request Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant