Conversation
CodSpeed Performance ReportMerging #6112 will not alter performanceComparing Summary
Footnotes |
|
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis PR updates documentation comments across configuration, linter, and assist rules. In analyzer and codegen, field docs for recommended and use_sorted_keys are reworded for grammar and consistency. The linter’s RuleDomainValue::Recommended doc string is similarly adjusted. JS and JSON UseSortedKeys rule docs are expanded to define “natural order,” clarify case and numeric comparisons, note non-sortable keys behaviour, potential semantic impacts, and include the suppression comment: // biome-ignore assist/source/useSortedKeys. There are no behavioural changes, no control-flow modifications, and no public API signature changes. Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs (1)
88-96: Options section: tidy phrasingQuick grammar clean-ups:
- /// This actions accepts following options + /// This action accepts the following options. @@ - /// This options supports `natural` and `lexicographic` values. Where as `natural` is the default. + /// This option supports `natural` and `lexicographic` values, with `natural` as the default. @@ - /// Following will apply the natural sort order. + /// The following applies the natural sort order. @@ - /// Following will apply the lexicographic sort order. + /// The following applies the lexicographic sort order.Also applies to: 92-94, 113-121, 115-119
🧹 Nitpick comments (3)
crates/biome_configuration/src/analyzer/assist/actions.rs (1)
181-184: Make the summary language-agnosticThe config field describes an action used in both JS and JSON. Consider removing “JSON” to avoid narrowing the scope.
- #[doc = "Sort the keys of a JSON object in natural order."] + #[doc = "Sort object keys in natural order."]Also applies to: 196-199
xtask/codegen/src/generate_configuration.rs (1)
495-498: Follow-through: align top-level ‘recommended’ docs tooFor full consistency, consider updating the top-level generated structs (Actions/Rules) as well:
- /// It enables the assist actions recommended by Biome. `true` by default. + /// Enables the assist actions recommended by Biome. `true` by default.- /// It enables the lint rules recommended by Biome. `true` by default. + /// Enables the lint rules recommended by Biome. `true` by default.Also applies to: 634-637
crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs (1)
21-43: Polish documentation comments
- Fix typos: “e.g. [k]: 1” and “if one exists”.
- Replace “Since ES2020…” with “Per the ECMAScript specification…” to avoid a brittle year reference.
- /// This rule will consider spread/calculated keys e.g [k]: 1 as - /// non-sortable. Instead, whenever it encounters a non-sortable key, it - /// will sort all the previous sortable keys up until the nearest - /// non-sortable key, if one exist. This prevents breaking the override of - /// certain keys using spread keys. + /// This rule considers spread/calculated keys (e.g. `[k]: 1`) as non-sortable. + /// When it encounters a non-sortable key, it sorts preceding sortable keys + /// up to the nearest non-sortable key. This prevents breaking overrides of + /// certain keys introduced via spread keys. @@ - /// Sorting the keys of an object technically changes the semantics of the - /// program. It affects the result of operations like - /// `Object.getOwnPropertyNames`. Since ES2020, operations like `for-in` - /// loops, `Object.keys`, and `JSON.stringify` are guaranteed to process - /// string keys in insertion order. + /// Sorting object keys can change program semantics (e.g. the result of + /// `Object.getOwnPropertyNames`). Per the ECMAScript specification, + /// operations such as `for-in` loops, `Object.keys`, and `JSON.stringify` + /// process string keys in insertion order.Also update the options section phrasing (see next comment).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (3)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 Files selected for processing (5)
crates/biome_configuration/src/analyzer/assist/actions.rs(2 hunks)crates/biome_configuration/src/analyzer/linter/mod.rs(1 hunks)crates/biome_js_analyze/src/assist/source/use_sorted_keys.rs(1 hunks)crates/biome_json_analyze/src/assist/source/use_sorted_keys.rs(1 hunks)xtask/codegen/src/generate_configuration.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format Rust and TOML files before committing (use
just f/just format).
Files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration/src/analyzer/linter/mod.rscrates/biome_json_analyze/src/assist/source/use_sorted_keys.rsxtask/codegen/src/generate_configuration.rscrates/biome_js_analyze/src/assist/source/use_sorted_keys.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration/src/analyzer/linter/mod.rscrates/biome_json_analyze/src/assist/source/use_sorted_keys.rscrates/biome_js_analyze/src/assist/source/use_sorted_keys.rs
crates/biome_configuration/src/**
📄 CodeRabbit inference engine (CLAUDE.md)
Keep configuration sources under biome_configuration/src/
Files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_configuration/src/analyzer/linter/mod.rs
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}
Files:
crates/biome_json_analyze/src/assist/source/use_sorted_keys.rscrates/biome_js_analyze/src/assist/source/use_sorted_keys.rs
🧠 Learnings (3)
📚 Learning: 2025-08-11T11:40:38.097Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:40:38.097Z
Learning: For documentation of rules/assists/options, use inline Rustdoc in source code; other docs updates should go to the website repo’s next branch.
Applied to files:
crates/biome_configuration/src/analyzer/assist/actions.rscrates/biome_js_analyze/src/assist/source/use_sorted_keys.rs
📚 Learning: 2025-08-17T08:56:30.831Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-17T08:56:30.831Z
Learning: Applies to crates/biome_analyze/crates/**/lib/src/**/nursery/**/*.rs : Use `domains` in `declare_lint_rule!` when applicable; recommended rules with domains enable only when the domain is active
Applied to files:
crates/biome_configuration/src/analyzer/linter/mod.rs
📚 Learning: 2025-08-17T08:56:30.831Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-17T08:56:30.831Z
Learning: Applies to crates/biome_analyze/crates/biome_rule_options/lib/**/*.rs : Define per-rule options in the `biome_rule_options` crate under `lib/`, with serde- and schemars-compatible derives and `#[serde(rename_all = "camelCase", deny_unknown_fields, default)]`
Applied to files:
crates/biome_configuration/src/analyzer/linter/mod.rs
⏰ 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). (27)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Parser conformance
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: autofix
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Test Node.js API
- GitHub Check: Check JS Files
- GitHub Check: Documentation
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: End-to-end tests
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Check Dependencies
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-windows-2022)
🔇 Additional comments (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (1)
50-51: LGTM: clearer phrasing for Recommended domainReads well and aligns with the other “Enables …” docs.
xtask/codegen/src/generate_configuration.rs (1)
940-942: LGTM: consistent “Enables …” phrasingGood consistency upgrade for generated group structs.
Also applies to: 1013-1015
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Summary
Expands the documentation of useSortedKeys, to make developers more aware about potential semantic changes.
This follows a discussion in #5907
There are a few drive-by changes to other assist descriptions, so that they follow a consistent sentence structure.
Test Plan
Documentation-only change, no tests needed.