-
-
Notifications
You must be signed in to change notification settings - Fork 724
feat(lint): move some rules to the react
domain
#7548
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
Conversation
🦋 Changeset detectedLatest commit: 6669b34 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 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 |
WalkthroughScopes several existing lint rules to the React domain by importing Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (22)
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.
Actionable comments posted: 0
🧹 Nitpick comments (8)
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs (1)
4-4
: React domain scoping looks right; bump rule version metadata.Per the contributor guide, mark updated rules with
version: "next"
when changing rule metadata (domains). Everything else LGTM.Apply:
- version: "1.0.0", + version: "next",Please confirm this rule’s docs mention it now lives under the React domain.
Also applies to: 35-35
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs (1)
5-7
: Scoped to React domain — good; updateversion
tonext
.Metadata-only change warrants
version: "next"
. No logic changes spotted.Use:
- version: "2.0.0", + version: "next",Double‑check docs/release notes reflect the new domain gating.
Also applies to: 47-47
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs (1)
4-4
: Domain assignment is appropriate; please flipversion
tonext
.Keeps noise out of non‑React projects. Version metadata should signal the update.
Patch:
- version: "1.0.0", + version: "next",Confirm the rule doc calls out React domain scoping.
Also applies to: 44-44
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs (1)
4-4
: Good move to React domain; alignversion
metadata.Switch the rule header to
version: "next"
for this metadata change.Change:
- version: "1.0.0", + version: "next",Please ensure the docs snippet for this rule is still valid under domain scoping.
Also applies to: 33-33
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs (2)
4-4
: React‑only domain makes sense; nudgeversion
tonext
.No behavioural changes detected—just metadata—so mark as
next
.Apply:
- version: "1.0.0", + version: "next",Confirm any rule docs or examples haven’t drifted with the new domain gating.
Also applies to: 73-73
21-26
: Tiny docs polish: link and wording.Consider updating the React docs link to the current site and tweak “performances” → “performance” in the diagnostic notes for clarity.
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs (1)
3-3
: Nicely scoped to React; please setversion
tonext
.Tracks the metadata change properly; rest looks tidy.
Diff:
- version: "1.9.2", + version: "next",Shall we add a brief note in the rule docs that it’s only active when the React domain is enabled/detected?
Also applies to: 104-104
.changeset/seven-beans-cough.md (1)
5-12
: Tighten the changeset: tense, auto‑detection note, links, and a minimal example.
- Use past tense for what you did and present tense for current behaviour.
- Fix “unless you enabled” → “unless you enable”.
- Add a one‑liner about React domain auto‑detection to avoid confusion with the PR description.
- Include rule doc links and a minimal example snippet.
Proposed rewrite:
The following rules are now a part of the `react` domain, and they won't be enabled automatically unless you enabled the domain: +Moved the following rules into the `react` domain. + +Biome automatically enables the `react` domain when React is detected in your dependencies. Otherwise, enable the domain to use these rules. + - `lint/correctness/noChildrenProp` (recommended) - `lint/correctness/noReactPropAssignments` - `lint/security/noDangerouslySetInnerHtml` (recommended) - `lint/security/noDangerouslySetInnerHtmlWithChildren` (recommended) - `lint/style/useComponentExportOnlyModules` - `lint/suspicious/noArrayIndexKey` (recommended) + +#### Example + +```jsx +// Triggers lint/suspicious/noArrayIndexKey. +items.map((item, index) => <li key={index}>{item}</li>); +``` + +#### Rule docs + +- lint/correctness/noChildrenProp — https://biomejs.dev/linter/rules/no-children-prop. +- lint/correctness/noReactPropAssignments — https://biomejs.dev/linter/rules/no-react-prop-assignments. +- lint/security/noDangerouslySetInnerHtml — https://biomejs.dev/linter/rules/no-dangerously-set-inner-html. +- lint/security/noDangerouslySetInnerHtmlWithChildren — https://biomejs.dev/linter/rules/no-dangerously-set-inner-html-with-children. +- lint/style/useComponentExportOnlyModules — https://biomejs.dev/linter/rules/use-component-export-only-modules. +- lint/suspicious/noArrayIndexKey — https://biomejs.dev/linter/rules/no-array-index-key.Kindly verify the doc URLs and the exact phrasing Biome uses for enabling domains.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.changeset/seven-beans-cough.md
(1 hunks)crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
(2 hunks)crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
(2 hunks)crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
(2 hunks)crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
(2 hunks)crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
(2 hunks)crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
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_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
.changeset/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md
: In changeset files, only use #### or ##### headers; avoid other header levels
Changeset descriptions should use past tense for what you did (e.g., "Added...")
Describe current Biome behavior in present tense within changesets (e.g., "Biome now supports...")
For bug fixes in changesets, start with a link to the issue (e.g., "Fixed #1234: ...")
When referencing rules or assists in changesets, include links to their documentation pages
Include a minimal code block in the changeset when applicable to demonstrate the change
End every sentence in the changeset description with a period
Files:
.changeset/seven-beans-cough.md
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : In declare_lint_rule! macros, set `version: "next"` for new or updated rules
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Recommended rules with domains are enabled only when users enable the matching domains; use `domains` metadata judiciously
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Recommended rules with domains are enabled only when users enable the matching domains; use `domains` metadata judiciously
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
.changeset/seven-beans-cough.md
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : When deprecating a rule, add `deprecated: "<reason>"` to `declare_lint_rule!`
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : In declare_lint_rule! macros, set `version: "next"` for new or updated rules
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Set the `language` field in `declare_lint_rule!` to the primary language (`js`, `jsx`, `ts`, or `tsx`) the rule targets
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : If a rule returns a code action (implements `action`), add `fix_kind` in `declare_lint_rule!` and use `ctx.metadata().applicability()` when building the action
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Code blocks in rule docs must specify language; invalid snippets require `expect_diagnostic`; use `options`/`full_options`/`use_options` markers as appropriate
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/crates/biome_js_analyze/lib/src/{lint,assist}/**/*.rs : When banning globals (e.g., `noConsoleLog`), check the semantic model to avoid false positives from locally shadowed bindings
Applied to files:
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs
📚 Learning: 2025-09-07T17:35:00.517Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-09-07T17:35:00.517Z
Learning: Applies to .changeset/*.md : Describe current Biome behavior in present tense within changesets (e.g., "Biome now supports...")
Applied to files:
.changeset/seven-beans-cough.md
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/crates/biome_rule_options/lib/**/*.rs : Define per-rule options types in `biome_rule_options` crate (one file per rule, e.g., `lib/use_my_rule.rs`)
Applied to files:
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
📚 Learning: 2025-08-11T11:46:05.836Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:46:05.836Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper advice types from biome_diagnostics::v2 (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) when suitable
Applied to files:
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
📚 Learning: 2025-08-11T11:46:05.836Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:46:05.836Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Specify category and severity using #[diagnostic(...)] on the type or derive them from fields
Applied to files:
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
📚 Learning: 2025-08-11T11:46:05.836Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:46:05.836Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Types implementing Diagnostic must also implement Debug (e.g., use #[derive(Debug, Diagnostic)])
Applied to files:
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs
🧬 Code graph analysis (6)
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html_with_children.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
crates/biome_js_analyze/src/lint/correctness/no_children_prop.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
crates/biome_js_analyze/src/lint/correctness/no_react_prop_assignments.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
crates/biome_js_analyze/src/lint/security/no_dangerously_set_inner_html.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
crates/biome_js_analyze/src/lint/style/use_component_export_only_modules.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
crates/biome_js_analyze/src/lint/suspicious/no_array_index_key.rs (1)
crates/biome_analyze/src/rule.rs (1)
domains
(617-620)
⏰ 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). (23)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Documentation
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: autofix
CodSpeed Performance ReportMerging #7548 will not alter performanceComparing Summary
|
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/biome_service/src/file_handlers/mod.rs (1)
1096-1107
: Unreachable branch — recommended domain rules never disabledEarly-return when no domains are configured (crates/biome_service/src/file_handlers/mod.rs:1096–1097) makes the subsequent "disable recommended rules" block (1100–1107) unreachable. Compute no_domains first and run the recommended-disable check before returning. Example change:
- // no domains, no need to record the rule - if domains.as_ref().is_none_or(|d| d.is_empty()) { - return; - } - - // If the rule is recommended, and it has some domains, it should be disabled, but only if the configuration doesn't enable some domains. - if R::METADATA.recommended - && !R::METADATA.domains.is_empty() - && domains.as_ref().is_none_or(|d| d.is_empty()) - { - self.disabled_rules.insert(rule_filter); - return; - } + let no_domains = domains.as_ref().is_none_or(|d| d.is_empty()); + if R::METADATA.recommended && !R::METADATA.domains.is_empty() && no_domains { + self.disabled_rules.insert(rule_filter); + return; + } + if no_domains { + return; + }
🧹 Nitpick comments (1)
.changeset/crazy-steaks-mix.md (1)
1-6
: Polish the changeset copy and drop the stray character.
- The body would benefit from a past‑tense summary of what you changed and a present‑tense note of current behaviour per repo guidelines.
- There’s a stray
6
on Line 6 that will leak into release notes.Apply:
--- "@biomejs/biome": minor --- -The rules in a domain are no longer enabled automatically by the installed dependencies unless the rule is recommended. -6 +#### React domain scoping and recommended gating. + +Moved several React‑specific lint rules into the `react` domain so they only run in React contexts. + +Biome now enables rules in a domain only when that domain is configured or detected and the rule is recommended. + +Example: +```jsonc +// biome.json +{ + "linter": { + "rules": { "recommended": true }, + "domains": { "react": "recommended" } + } +} +```Also consider adding links for each referenced rule’s documentation.
Please confirm the config keys above match the current schema; if not, I’ll adjust the snippet.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
crates/biome_configuration/src/analyzer/linter/rules.rs
is excluded by!**/rules.rs
and included by**
crates/biome_configuration/src/generated/domain_selector.rs
is excluded by!**/generated/**
,!**/generated/**
and included by**
📒 Files selected for processing (2)
.changeset/crazy-steaks-mix.md
(1 hunks)crates/biome_service/src/file_handlers/mod.rs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md
: In changeset files, only use #### or ##### headers; avoid other header levels
Changeset descriptions should use past tense for what you did (e.g., "Added...")
Describe current Biome behavior in present tense within changesets (e.g., "Biome now supports...")
For bug fixes in changesets, start with a link to the issue (e.g., "Fixed #1234: ...")
When referencing rules or assists in changesets, include links to their documentation pages
Include a minimal code block in the changeset when applicable to demonstrate the change
End every sentence in the changeset description with a period
Files:
.changeset/crazy-steaks-mix.md
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_service/src/file_handlers/mod.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_service/src/file_handlers/mod.rs
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Recommended rules with domains are enabled only when users enable the matching domains; use `domains` metadata judiciously
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : In declare_lint_rule! macros, set `version: "next"` for new or updated rules
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-09-07T17:35:00.517Z
Learning: Applies to .changeset/*.md : Describe current Biome behavior in present tense within changesets (e.g., "Biome now supports...")
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Set the `language` field in `declare_lint_rule!` to the primary language (`js`, `jsx`, `ts`, or `tsx`) the rule targets
📚 Learning: 2025-09-07T17:35:00.517Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-09-07T17:35:00.517Z
Learning: Applies to .changeset/*.md : Describe current Biome behavior in present tense within changesets (e.g., "Biome now supports...")
Applied to files:
.changeset/crazy-steaks-mix.md
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : Recommended rules with domains are enabled only when users enable the matching domains; use `domains` metadata judiciously
Applied to files:
.changeset/crazy-steaks-mix.md
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : In declare_lint_rule! macros, set `version: "next"` for new or updated rules
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/crates/biome_rule_options/lib/**/*.rs : Define per-rule options types in `biome_rule_options` crate (one file per rule, e.g., `lib/use_my_rule.rs`)
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-09-10T08:05:22.867Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-09-10T08:05:22.867Z
Learning: Applies to crates/biome_analyze/**/src/{lint,assist}/**/*.rs : If a rule returns a code action (implements `action`), add `fix_kind` in `declare_lint_rule!` and use `ctx.metadata().applicability()` when building the action
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-08-11T11:46:05.836Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:46:05.836Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper advice types from biome_diagnostics::v2 (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) when suitable
Applied to files:
crates/biome_service/src/file_handlers/mod.rs
🧬 Code graph analysis (1)
crates/biome_service/src/file_handlers/mod.rs (1)
crates/biome_service/src/settings.rs (1)
recommended_enabled
(401-407)
⏰ 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). (24)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Documentation
- GitHub Check: End-to-end tests
- GitHub Check: Check Dependencies
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: autofix
🔇 Additional comments (1)
crates/biome_service/src/file_handlers/mod.rs (1)
1039-1043
: Incorrect — keep linter_recommended_enabled()Settings defines pub fn linter_recommended_enabled(&self) -> bool (it calls self.linter.recommended_enabled()), so the suggested rename to recommended_enabled() is incorrect; leave the call as-is.
Likely an incorrect or invalid review comment.
Summary
The following rules are now a part of the
react
domain. It will prevent the rules to be applied where it's not a React world.lint/correctness/noChildrenProp
lint/correctness/noReactPropAssignments
lint/security/noDangerouslySetInnerHtml
lint/security/noDangerouslySetInnerHtmlWithChildren
lint/style/useComponentExportOnlyModules
lint/suspicious/noArrayIndexKey
Migration is unlikely needed as Biome will enable the
react
domain automatically when it detects React in the dependencies.Test Plan
N/A
Docs
N/A