-
-
Notifications
You must be signed in to change notification settings - Fork 726
docs: extra rule sources #7522
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
docs: extra rule sources #7522
Conversation
🦋 Changeset detectedLatest commit: 28646b8 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 |
WalkthroughThe PR adds a new RuleSource variant Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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 (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs (1)
65-73
: Version bump policy checkDoes adding to
sources
count as a rule update requiringversion: "next"
per lint metadata policy? If yes, bump it; if not, ignore. Just making sure we don’t trip the release notes.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
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/complexity/no_useless_fragments.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
🧠 Learnings (4)
📚 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/complexity/no_useless_fragments.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/complexity/no_useless_fragments.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/complexity/no_useless_fragments.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/complexity/no_useless_fragments.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs (1)
crates/biome_analyze/src/rule.rs (2)
sources
(569-572)same
(241-246)
⏰ 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: Test Node.js API
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: autofix
🔇 Additional comments (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs (1)
69-69
: Incorrect — EslintReactXyz is a valid RuleSource; do not remove itRuleSource::EslintReactXyz is defined in crates/biome_analyze/src/rule.rs (maps to @eslint-react/eslint-plugin and eslint-react.xyz docs) and is already used elsewhere (e.g. crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs). The two entries likely cover different plugins: keep both if you intend to map both plugin IDs ("jsx-no-useless-fragment" for eslint-plugin-react and "no-useless-fragment" for eslint-react.xyz); otherwise confirm the correct eslint-react.xyz rule id and update.
Likely an incorrect or invalid review comment.
CodSpeed Performance ReportMerging #7522 will not alter performanceComparing Summary
|
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 (2)
crates/biome_analyze/src/rule.rs (1)
123-126
: New RuleSource variant added — nice, but tweak the docs for clarityBoth EslintReactX and EslintReactXyz point to the same docs site; consider clarifying plugin names in the doc comments to avoid confusion between the packages.
Apply this small doc touch‑up:
- /// Rules from [eslint-react.xyz](https://eslint-react.xyz/) - EslintReactX(&'static str), - /// Rules from [eslint-react.xyz](https://eslint-react.xyz/) + /// Rules from eslint-plugin-react-x (docs: https://eslint-react.xyz/) + EslintReactX(&'static str), + /// Rules from @eslint-react/eslint-plugin (docs: https://eslint-react.xyz/) EslintReactXyz(&'static str),crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
89-92
: Version tag: align with house style if applicableIf the project practice is to bump
version
to"next"
whenever a rule’s metadata changes (e.g. sources), consider doing so here; otherwise ignore.- version: "2.0.0", + version: "next",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ 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 (3)
crates/biome_analyze/src/rule.rs
(5 hunks)crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
(1 hunks)crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
🧰 Additional context used
📓 Path-based instructions (3)
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/correctness/no_nested_component_definitions.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
crates/biome_analyze/src/rule.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
crates/biome_analyze/src/rule.rs
🧠 Learnings (7)
📚 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/correctness/no_nested_component_definitions.rs
crates/biome_analyze/src/rule.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/correctness/no_nested_component_definitions.rs
crates/biome_analyze/src/rule.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/correctness/no_nested_component_definitions.rs
crates/biome_analyze/src/rule.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_analyze/src/rule.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_analyze/src/rule.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: Update documentation when features change; for rules/assists/options, use inline Rust rustdoc
Applied to files:
crates/biome_analyze/src/rule.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 : Recommended rules with domains are enabled only when users enable the matching domains; use `domains` metadata judiciously
Applied to files:
crates/biome_analyze/src/rule.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
crates/biome_analyze/src/rule.rs (1)
same
(244-249)
⏰ 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). (25)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: End-to-end tests
- GitHub Check: Documentation
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Check Dependencies
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test Node.js API
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: autofix
🔇 Additional comments (5)
crates/biome_analyze/src/rule.rs (4)
190-191
: Display strings match the plugin namesThe rendered names look correct and consistent with ecosystem naming. LGTM.
274-276
: Rule name forwarding wired correctlyIncluding EslintReactX in as_rule_name is correct. No issues spotted.
357-359
: URLs validated — one redirects (308), one OK (200)Checked: no-nested-components → HTTP/2 308 (redirect); no-useless-fragment → HTTP/2 200. No changes required.
313-315
: Confirmed: use react-x/{rule_name} (no change required)eslint-plugin-react-x exposes rules as react-x/ and the scope 10000 d package exposes @eslint-react/. (eslint-react.xyz)
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
93-96
: Extra upstream source reference — good callAdding EslintReactX("no-nested-components").same() improves cross‑ecosystem traceability. Looks tidy.
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.
We should still add a changeset. The addition of new plugins have direct repercussions on the migrate
command. It means now users can migrate from those plugins, for these rules. A patch
should be enough
sources: &[ | ||
RuleSource::EslintReact("jsx-no-useless-fragment").same(), | ||
RuleSource::EslintReactX("no-useless-fragment").same(), | ||
RuleSource::EslintReactXyz("no-useless-fragment").same() | ||
], |
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.
This is more a provocation than a real question, but why are there three plugins that do the same thing? 😅
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.
react-x is a subset of xyz & extension to the regular react plugin
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
d2347d4
to
d6bd5f1
Compare
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 (2)
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
89-90
: Set version to "next" after updating rule metadata.Per our contributor guidance, bump the rule version to "next" when adjusting metadata (sources changed).
Apply this diff:
- version: "2.0.0", + version: "next",crates/biome_analyze/src/rule.rs (1)
123-125
: Clarify the EslintReactX doc comment.Both EslintReactX and EslintReactXyz reference the same site in docs; consider naming the plugin explicitly to avoid confusion.
Apply this diff:
- /// Rules from [eslint-react.xyz](https://eslint-react.xyz/) + /// Rules from [eslint-plugin-react-x](https://eslint-react.xyz/)
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ 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 (5)
.changeset/major-onions-change.md
(1 hunks)crates/biome_analyze/src/rule.rs
(5 hunks)crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
(1 hunks)crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
(1 hunks)crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .changeset/major-onions-change.md
- crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
🧰 Additional context used
📓 Path-based instructions (3)
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/nursery/no_react_forward_ref.rs
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs
crates/biome_analyze/src/rule.rs
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs
crates/biome_analyze/src/rule.rs
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs
🧠 Learnings (5)
📚 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_analyze/src/rule.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_analyze/src/rule.rs
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.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_analyze/src/rule.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_analyze/src/rule.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_analyze/src/rule.rs
🧬 Code graph analysis (2)
crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs (1)
crates/biome_analyze/src/rule.rs (2)
sources
(575-578)same
(244-249)
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
crates/biome_analyze/src/rule.rs (1)
same
(244-249)
⏰ 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: autofix
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Check Dependencies
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Test Node.js API
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_html_parser)
- 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_js_analyze)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_css_parser)
🔇 Additional comments (4)
crates/biome_js_analyze/src/lint/correctness/no_nested_component_definitions.rs (1)
93-96
: Extra source mapping looks good.Adding eslint-plugin-react-x alongside the existing sources helps cross-reference nicely.
crates/biome_js_analyze/src/lint/nursery/no_react_forward_ref.rs (1)
75-78
: LGTM on expanded sources.The added mapping to eslint-plugin-react-x complements the xyz source without affecting behaviour.
crates/biome_analyze/src/rule.rs (2)
190-190
: New RuleSource::EslintReactX wiring is consistent.Display label, namespaced name, URL, and rule-name extraction all line up. Nicely done.
Also applies to: 274-276, 313-315, 357-358
357-358
: React‑X rule URLs are correct — no change neededDocs are hosted at https://eslint-react.xyz/docs/rules/, so those format strings are valid.
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ 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 (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
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/complexity/no_useless_fragments.rs
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format all Rust source files before committing (just f)
Files:
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs
🧠 Learnings (3)
📚 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/complexity/no_useless_fragments.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/complexity/no_useless_fragments.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/complexity/no_useless_fragments.rs
🧬 Code graph analysis (1)
crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs (1)
crates/biome_analyze/src/rule.rs (2)
sources
(575-578)same
(244-249)
⏰ 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: Test Node.js API
- GitHub Check: autofix
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Check Dependencies
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_js_analyze)
version: "1.0.0", | ||
name: "noUselessFragments", | ||
language: "jsx", | ||
sources: &[RuleSource::EslintReact("jsx-no-useless-fragment").same()], | ||
sources: &[ | ||
RuleSource::EslintReact("jsx-no-useless-fragment").same(), | ||
RuleSource::EslintReactX("no-useless-fragment").same(), | ||
RuleSource::EslintReactXyz("no-useless-fragment").same() | ||
], |
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.
Bump the rule metadata version.
We touched the rule metadata but left version: "1.0.0"
. Please switch it to "next"
so the docs pipeline knows this rule changed.
Based on learnings
- version: "1.0.0",
+ version: "next",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurate DFB0 ly replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
version: "1.0.0", | |
name: "noUselessFragments", | |
language: "jsx", | |
sources: &[RuleSource::EslintReact("jsx-no-useless-fragment").same()], | |
sources: &[ | |
RuleSource::EslintReact("jsx-no-useless-fragment").same(), | |
RuleSource::EslintReactX("no-useless-fragment").same(), | |
RuleSource::EslintReactXyz("no-useless-fragment").same() | |
], | |
version: "next", | |
name: "noUselessFragments", | |
language: "jsx", | |
sources: &[ | |
RuleSource::EslintReact("jsx-no-useless-fragment").same(), | |
RuleSource::EslintReactX("no-useless-fragment").same(), | |
RuleSource::EslintReactXyz("no-useless-fragment").same() | |
], |
🤖 Prompt for AI Agents
In crates/biome_js_analyze/src/lint/complexity/no_useless_fragments.rs around
lines 67 to 74, the rule metadata still sets version: "1.0.0" even though the
rule was changed; update the version field to "next" so the docs pipeline
recognizes the change by replacing the string "1.0.0" with "next" in the rule
metadata definition.
Summary
Add extra sources from different plugin
eslint-plugin-react-x
is subset of@eslint-react/eslint-plugin
(I think they at one point merged 2 plugins)