Skip to content

fix(rage): print rules enabled by domains#10358

Merged
dyc3 merged 1 commit into
mainfrom
dyc3/rage-include-domains
May 13, 2026
Merged

fix(rage): print rules enabled by domains#10358
dyc3 merged 1 commit into
mainfrom
dyc3/rage-include-domains

Conversation

@dyc3

@dyc3 dyc3 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

biome rage --linter previously wasn't showing rules enabled by domains. this fixes that

implemented with gpt 5.5

fixes #10356

Test Plan

added a cli test

Docs

@changeset-bot

changeset-bot Bot commented May 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f3b0d68

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

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@biomejs/benchmark" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@github-actions github-actions Bot added the A-CLI Area: CLI label May 13, 2026
@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The rage command now properly reports all enabled linter rules by computing them through domain resolution instead of listing only directly configured rules. The fix imports domain-selection types, adds a linter_enabled_rules helper that applies domain constraints to build a complete rule set, and refactors the output struct to store the computed set. The command integrates this computation during linter configuration display. A snapshot test verifies domain-scoped rules appear in the output.

Suggested labels

A-CLI, A-Linter

Suggested reviewers

  • ematipico
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(rage): print rules enabled by domains' accurately summarises the main change—the rage command now displays rules enabled via linter domains.
Description check ✅ Passed The description explains the motivation (biome rage --linter wasn't showing rules enabled by domains), references the fixed issue (#10356), and mentions testing and AI disclosure.
Linked Issues check ✅ Passed The PR fully addresses issue #10356: the code changes ensure biome rage --linter now computes and displays rules enabled via domain presets (e.g., react: 'recommended'), with a corresponding test case validating the fix.
Out of Scope Changes check ✅ Passed All changes directly support the fix: a changeset documenting the patch, rage.rs logic to compute domain-enabled rules, and a test validating the new behaviour—nothing extraneous.

✏️ 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/rage-include-domains

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

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
crates/biome_cli/tests/commands/rage.rs (1)

248-283: ⚡ Quick win

Add snapshot coverage for recommended and none domain modes.

Great regression test for "all". A pair of tiny follow-ups for the other new branches would keep this fix future-proof.

Suggested additions
+#[test]
+#[serial]
+fn with_linter_domain_recommended_configuration() {
+    // biome.json with:
+    // "linter": { "enabled": true, "rules": { "recommended": false }, "domains": { "qwik": "recommended" } }
+    // run: rage --linter
+    // assert snapshot: "with_linter_domain_recommended_configuration"
+}
+
+#[test]
+#[serial]
+fn with_linter_domain_none_configuration() {
+    // biome.json with:
+    // "linter": { "enabled": true, "domains": { "qwik": "none" }, ...possibly one explicit qwik rule... }
+    // run: rage --linter
+    // assert snapshot: "with_linter_domain_none_configuration"
+}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/biome_cli/tests/commands/rage.rs` around lines 248 - 283, Add two
additional tests mirroring with_linter_domain_configuration to cover the other
domain modes: create tests named with_linter_domain_configuration_recommended
and with_linter_domain_configuration_none that each build a MemoryFileSystem
with a biome.json like the original but set "domains": { "qwik": "recommended" }
and "domains": { "qwik": "none" } respectively, run run_rage(fs, &mut console,
Args::from(["rage", "--linter"].as_slice())), assert result.is_ok(), and call
assert_rage_snapshot(SnapshotPayload::new(module_path!(), "<test_name>", fs,
console, result)) so the new branches for recommended and none are
snapshot-tested alongside the existing with_linter_domain_configuration test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/biome_cli/tests/commands/rage.rs`:
- Around line 248-283: Add two additional tests mirroring
with_linter_domain_configuration to cover the other domain modes: create tests
named with_linter_domain_configuration_recommended and
with_linter_domain_configuration_none that each build a MemoryFileSystem with a
biome.json like the original but set "domains": { "qwik": "recommended" } and
"domains": { "qwik": "none" } respectively, run run_rage(fs, &mut console,
Args::from(["rage", "--linter"].as_slice())), assert result.is_ok(), and call
assert_rage_snapshot(SnapshotPayload::new(module_path!(), "<test_name>", fs,
console, result)) so the new branches for recommended and none are
snapshot-tested alongside the existing with_linter_domain_configuration test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d8ce531c-db7d-4f09-98ad-840b5ccfeee2

📥 Commits

Reviewing files that changed from the base of the PR and between 8e4ada5 and f3b0d68.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_linter_domain_configuration.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/fix-rage-domain-rules.md
  • crates/biome_cli/src/commands/rage.rs
  • crates/biome_cli/tests/commands/rage.rs

@dyc3 dyc3 merged commit 05c2617 into main May 13, 2026
26 checks passed
@dyc3 dyc3 deleted the dyc3/rage-include-domains branch May 13, 2026 14:01
@github-actions github-actions Bot mentioned this pull request May 14, 2026
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Client that referenced this pull request Jun 3, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.4.15` -> `2.4.16`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.4.15/2.4.16) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.4.16`](https://github.com/biomejs/biome/blob/HEAD/packages/@&#8203;biomejs/biome/CHANGELOG.md#2416)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.15...@biomejs/biome@2.4.16)

##### Patch Changes

- [#&#8203;10329](biomejs/biome#10329) [`ef764d5`](biomejs/biome@ef764d5) Thanks [@&#8203;Conaclos](https://github.com/Conaclos)! - Fixed an issue where diagnostics showed an incorrect location in Astro files.

- [#&#8203;10363](biomejs/biome#10363) [`50aa415`](biomejs/biome@50aa415) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed HTML formatting for a case where comments could cause the formatter to split up a closing tag, which would cause the resulting HTML to be syntactically invalid.

  Input:

  ```html
  <span
    ><!-- 1
  --><span>a</span
    ><!-- 2
  --><span>b</span
    ><!-- 3
  --></span>
  ```

  Output:

  ```diff
    <span
  	  ><!-- 1
  - --> <span>a</span<!-- 2
  - --> ><span>b</span><!-- 3
  + --><span>a</span><!-- 2
  + --><span>b</span><!-- 3
    --></span
    >
  ```

- [#&#8203;10465](biomejs/biome#10465) [`0c718da`](biomejs/biome@0c718da) Thanks [@&#8203;dfedoryshchev](https://github.com/dfedoryshchev)! - Fixed diagnostics emitted by the `noUntrustedLicenses` rule.

- [#&#8203;10358](biomejs/biome#10358) [`05c2617`](biomejs/biome@05c2617) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10356](biomejs/biome#10356): `biome rage --linter` now displays rules enabled through linter domains in the enabled rules list.

- [#&#8203;10300](biomejs/biome#10300) [`950247c`](biomejs/biome@950247c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10265](biomejs/biome#10265): Svelte function bindings such as `bind:value={get, set}` are now parsed more precisely, so [`noCommaOperator`](https://biomejs.dev/linter/rules/no-comma-operator/) won't emit false positives for that syntax anymore.

- [#&#8203;9786](biomejs/biome#9786) [`e71f584`](biomejs/biome@e71f584) Thanks [@&#8203;MeGaNeKoS](https://github.com/MeGaNeKoS)! - Fixed [#&#8203;8480](biomejs/biome#8480): [`useDestructuring`](https://biomejs.dev/linter/rules/use-destructuring/) now provides `variableDeclarator` and `assignmentExpression` options to control which contexts enforce destructuring, matching ESLint's `prefer-destructuring` configuration. Both default to `{array: true, object: true}`. The diagnostic for object destructuring in assignment expressions now instructs users to wrap the assignment in parentheses.

- [#&#8203;10425](biomejs/biome#10425) [`1948b72`](biomejs/biome@1948b72) Thanks [@&#8203;sjh9714](https://github.com/sjh9714)! - Fixed [#&#8203;10244](biomejs/biome#10244): The `useOptionalChain` rule now detects negated guard inequality chains like `!foo || foo.bar !== "x"`.

- [#&#8203;10442](biomejs/biome#10442) [`001f94f`](biomejs/biome@001f94f) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10411](biomejs/biome#10411): [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/) no longer causes a stack overflow when a nested function returns an object with shorthand properties that shadow destructured variables from an outer scope.

- [#&#8203;10318](biomejs/biome#10318) [`9b1577f`](biomejs/biome@9b1577f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added support for `formatter.trailingCommas` in overrides. This option was previously available in the top-level formatter configuration but missing from formatter overrides.

- [#&#8203;10319](biomejs/biome#10319) [`2e37709`](biomejs/biome@2e37709) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed Vue and Svelte formatting for standalone interpolations in inline elements. Biome now preserves existing newlines in cases like:

  ```diff
  - <span> {{ value }} </span>
  + <span>
  +   {{ value }}
  + </span>
  ```

- [#&#8203;10365](biomejs/biome#10365) [`0a58eb0`](biomejs/biome@0a58eb0) Thanks [@&#8203;Netail](https://github.com/Netail)! - Fixed [#&#8203;10361](biomejs/biome#10361): [`noUnusedFunctionParameters`](https://biomejs.dev/linter/rules/no-unused-function-parameters/) now mentions the parameter name in the diagnostic.

- [#&#8203;10439](biomejs/biome#10439) [`df6b867`](biomejs/biome@df6b867) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS and SCSS formatting for comments around declaration colons so comments between property names, colons, and values stay at the same boundary as Prettier.

  ```diff
   .selector {
  -  color: /* red, */
  -    blue;
  +  color: /* red, */ blue;
   }
  ```

- [#&#8203;10344](biomejs/biome#10344) [`b30208c`](biomejs/biome@b30208c) Thanks [@&#8203;siketyan](https://github.com/siketyan)! - Fixed [`#10123`](biomejs/biome#10123): Corrected the [`noReactNativeDeepImports`](https://biomejs.dev/linter/rules/no-react-native-deep-imports/) source rule to point to the proper upstream rule, so users can migrate from the original rule correctly.

- [#&#8203;10328](biomejs/biome#10328) [`b59133f`](biomejs/biome@b59133f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10309](biomejs/biome#10309): Biome no longer adds newlines to Astro frontmatter when linter or assist `--write` mode is enabled.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Client/pulls/5
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Server that referenced this pull request Jun 3, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.4.15` -> `2.4.16`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.4.15/2.4.16) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.4.16`](https://github.com/biomejs/biome/blob/HEAD/packages/@&#8203;biomejs/biome/CHANGELOG.md#2416)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.4.15...@biomejs/biome@2.4.16)

##### Patch Changes

- [#&#8203;10329](biomejs/biome#10329) [`ef764d5`](biomejs/biome@ef764d5) Thanks [@&#8203;Conaclos](https://github.com/Conaclos)! - Fixed an issue where diagnostics showed an incorrect location in Astro files.

- [#&#8203;10363](biomejs/biome#10363) [`50aa415`](biomejs/biome@50aa415) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed HTML formatting for a case where comments could cause the formatter to split up a closing tag, which would cause the resulting HTML to be syntactically invalid.

  Input:

  ```html
  <span
    ><!-- 1
  --><span>a</span
    ><!-- 2
  --><span>b</span
    ><!-- 3
  --></span>
  ```

  Output:

  ```diff
    <span
  	  ><!-- 1
  - --> <span>a</span<!-- 2
  - --> ><span>b</span><!-- 3
  + --><span>a</span><!-- 2
  + --><span>b</span><!-- 3
    --></span
    >
  ```

- [#&#8203;10465](biomejs/biome#10465) [`0c718da`](biomejs/biome@0c718da) Thanks [@&#8203;dfedoryshchev](https://github.com/dfedoryshchev)! - Fixed diagnostics emitted by the `noUntrustedLicenses` rule.

- [#&#8203;10358](biomejs/biome#10358) [`05c2617`](biomejs/biome@05c2617) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10356](biomejs/biome#10356): `biome rage --linter` now displays rules enabled through linter domains in the enabled rules list.

- [#&#8203;10300](biomejs/biome#10300) [`950247c`](biomejs/biome@950247c) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10265](biomejs/biome#10265): Svelte function bindings such as `bind:value={get, set}` are now parsed more precisely, so [`noCommaOperator`](https://biomejs.dev/linter/rules/no-comma-operator/) won't emit false positives for that syntax anymore.

- [#&#8203;9786](biomejs/biome#9786) [`e71f584`](biomejs/biome@e71f584) Thanks [@&#8203;MeGaNeKoS](https://github.com/MeGaNeKoS)! - Fixed [#&#8203;8480](biomejs/biome#8480): [`useDestructuring`](https://biomejs.dev/linter/rules/use-destructuring/) now provides `variableDeclarator` and `assignmentExpression` options to control which contexts enforce destructuring, matching ESLint's `prefer-destructuring` configuration. Both default to `{array: true, object: true}`. The diagnostic for object destructuring in assignment expressions now instructs users to wrap the assignment in parentheses.

- [#&#8203;10425](biomejs/biome#10425) [`1948b72`](biomejs/biome@1948b72) Thanks [@&#8203;sjh9714](https://github.com/sjh9714)! - Fixed [#&#8203;10244](biomejs/biome#10244): The `useOptionalChain` rule now detects negated guard inequality chains like `!foo || foo.bar !== "x"`.

- [#&#8203;10442](biomejs/biome#10442) [`001f94f`](biomejs/biome@001f94f) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10411](biomejs/biome#10411): [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/) no longer causes a stack overflow when a nested function returns an object with shorthand properties that shadow destructured variables from an outer scope.

- [#&#8203;10318](biomejs/biome#10318) [`9b1577f`](biomejs/biome@9b1577f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Added support for `formatter.trailingCommas` in overrides. This option was previously available in the top-level formatter configuration but missing from formatter overrides.

- [#&#8203;10319](biomejs/biome#10319) [`2e37709`](biomejs/biome@2e37709) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed Vue and Svelte formatting for standalone interpolations in inline elements. Biome now preserves existing newlines in cases like:

  ```diff
  - <span> {{ value }} </span>
  + <span>
  +   {{ value }}
  + </span>
  ```

- [#&#8203;10365](biomejs/biome#10365) [`0a58eb0`](biomejs/biome@0a58eb0) Thanks [@&#8203;Netail](https://github.com/Netail)! - Fixed [#&#8203;10361](biomejs/biome#10361): [`noUnusedFunctionParameters`](https://biomejs.dev/linter/rules/no-unused-function-parameters/) now mentions the parameter name in the diagnostic.

- [#&#8203;10439](biomejs/biome#10439) [`df6b867`](biomejs/biome@df6b867) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS and SCSS formatting for comments around declaration colons so comments between property names, colons, and values stay at the same boundary as Prettier.

  ```diff
   .selector {
  -  color: /* red, */
  -    blue;
  +  color: /* red, */ blue;
   }
  ```

- [#&#8203;10344](biomejs/biome#10344) [`b30208c`](biomejs/biome@b30208c) Thanks [@&#8203;siketyan](https://github.com/siketyan)! - Fixed [`#10123`](biomejs/biome#10123): Corrected the [`noReactNativeDeepImports`](https://biomejs.dev/linter/rules/no-react-native-deep-imports/) source rule to point to the proper upstream rule, so users can migrate from the original rule correctly.

- [#&#8203;10328](biomejs/biome#10328) [`b59133f`](biomejs/biome@b59133f) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [#&#8203;10309](biomejs/biome#10309): Biome no longer adds newlines to Astro frontmatter when linter or assist `--write` mode is enabled.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTUuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 biome rage --linter does not list enabled domain rules

2 participants