+
Skip to content

Conversation

Jayllyz
Copy link
Contributor

@Jayllyz Jayllyz commented Jul 31, 2025

Summary

Add https://nextjs.org/docs/messages/no-async-client-component rule, the name in Biome is noNextAsyncClientComponent.

Test Plan

Added test case.

Docs

Copy link

changeset-bot bot commented Jul 31, 2025

🦋 Changeset detected

Latest commit: f998138

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-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Jul 31, 2025
@Jayllyz Jayllyz changed the title feat(analyse_js): Add noAsyncClientComponent rule in Next domain feat(analyse_js): add noAsyncClientComponent rule in Next domain Jul 31, 2025
@Jayllyz Jayllyz marked this pull request as draft July 31, 2025 22:06
Copy link

codspeed-hq bot commented Jul 31, 2025

CodSpeed Performance Report

Merging #7081 will not alter performance

Comparing Jayllyz:feat/no-async-client-component (f998138) with main (3f436b8)

Summary

✅ 128 untouched benchmarks

@github-actions github-actions bot added the A-CLI Area: CLI label Jul 31, 2025
@Jayllyz Jayllyz marked this pull request as ready for review August 1, 2025 07:49
@Jayllyz Jayllyz changed the title feat(analyse_js): add noAsyncClientComponent rule in Next domain feat(analyse/js): add noAsyncClientComponent rule in Next domain Aug 1, 2025
@Jayllyz Jayllyz changed the title feat(analyse/js): add noAsyncClientComponent rule in Next domain feat(analyse/js): add noNextAsyncClientComponent rule in Next domain Aug 1, 2025
Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a couple nitpicks on the precise wording.

@Jayllyz Jayllyz force-pushed the feat/no-async-client-component branch from 41f9171 to b57aa48 Compare August 5, 2025 08:31
@dyc3
Copy link
Contributor

dyc3 commented Aug 5, 2025

You can fix the merge conflicts for these files by running just gen-all

@Jayllyz Jayllyz force-pushed the feat/no-async-client-component branch from b57aa48 to e856b26 Compare August 5, 2025 13:50
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Walkthrough

A new linting rule, noNextAsyncClientComponent, has been introduced across the codebase to prevent the use of async functions as client components in Next.js projects. The rule is integrated into the Biome linter's nursery group, with supporting type definitions, configuration schema updates, diagnostics category registration, and comprehensive test cases for both valid and invalid usage. Documentation and migration logic have been adjusted to accommodate the new rule, ensuring it is fully supported in both the Rust and TypeScript/JSON configuration layers.

Suggested labels

D-Vue

Suggested reviewers

  • dyc3
  • ematipico

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between daede66 and f998138.

⛔ Files ignored due to path filters (2)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validClient.jsx.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validClient.jsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validClient.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx
⏰ 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: Bench (biome_configuration)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: autofix
  • GitHub Check: Check JS Files
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Jayllyz Jayllyz force-pushed the feat/no-async-client-component branch from a2f91f6 to ca938ed Compare August 5, 2025 13:59
Copy link
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: 2

♻️ Duplicate comments (1)
crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (1)

131-131: Fix grammar in diagnostic message.

The message has a grammatical error - it should be "components" (plural) to match the verb "are".

-                        "Async client component are not allowed."
+                        "Async client components are not allowed."
🧹 Nitpick comments (3)
crates/biome_js_analyze/src/lint/nursery.rs (1)

18-18: Module insertion is alphabetically correct but regenerate sources

no_next_async_client_component is inserted in the right alphabetical spot, yet this file is code-generated (//! Generated file). After manual merges, run just gen-all (or the appropriate code-gen target) so the generated sources and hash stay in sync.

crates/biome_rule_options/src/no_next_async_client_component.rs (2)

3-6: Add a doc-comment for clarity

All option structs in biome_rule_options usually carry a short Rustdoc explaining what rule they configure.
Adding one here will keep generated docs and IDE hovers consistent with the rest of the codebase.

+/// Configuration for the `noNextAsyncClientComponent` lint rule  
+///  
+/// This rule forbids declaring **async** client components in Next.js
+/// applications.  
 #[derive(Default, Clone, Debug, Deserialize, Deserializable, Eq, PartialEq, Serialize)]

5-5: #[serde(default)] is redundant on an empty struct

Since the struct has no fields, deserialisation can never fail due to missing fields, so the default attribute is a no-op.
Removing it avoids the impression that there are hidden defaults.

-#[serde(rename_all = "camelCase", deny_unknown_fields, default)]
+#[serde(rename_all = "camelCase", deny_unknown_fields)]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50ca155 and ca938ed.

⛔ Files ignored due to path filters (6)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.js.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx.snap is excluded by !**/*.snap
📒 Files selected for processing (15)
  • .changeset/shaggy-keys-camp.md (1 hunks)
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs (1 hunks)
  • crates/biome_configuration/src/analyzer/linter/rules.rs (12 hunks)
  • crates/biome_diagnostics_categories/src/categories.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/nursery.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/no_next_async_client_component.rs (1 hunks)
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts (5 hunks)
  • packages/@biomejs/biome/configuration_schema.json (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
crates/biome_*/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Core crates must be located in /crates/biome_*/

Files:

  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx
  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
  • crates/biome_configuration/src/analyzer/linter/rules.rs
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx
  • crates/biome_diagnostics_categories/src/categories.rs
  • crates/biome_rule_options/src/no_next_async_client_component.rs
  • crates/biome_js_analyze/src/lint/nursery.rs
**/*.{rs,toml}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Format code (Rust + TOML) using just format

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
  • crates/biome_configuration/src/analyzer/linter/rules.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
  • crates/biome_diagnostics_categories/src/categories.rs
  • crates/biome_rule_options/src/no_next_async_client_component.rs
  • crates/biome_js_analyze/src/lint/nursery.rs
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.386Z
Learning: Create new lint rules using `just new-js-lintrule`, `just new-css-lintrule`, `just new-json-lintrule`, or `just new-graphql-lintrule`, and the rule name must be camelCase
📚 Learning: create new lint rules using `just new-js-lintrule`, `just new-css-lintrule`, `just new-json-lintrule...
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.386Z
Learning: Create new lint rules using `just new-js-lintrule`, `just new-css-lintrule`, `just new-json-lintrule`, or `just new-graphql-lintrule`, and the rule name must be camelCase

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts
  • packages/@biomejs/biome/configuration_schema.json
  • crates/biome_diagnostics_categories/src/categories.rs
  • .changeset/shaggy-keys-camp.md
  • crates/biome_js_analyze/src/lint/nursery.rs
📚 Learning: move rules from nursery to stable group using `just move-rule stable rulename`...
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.386Z
Learning: Move rules from nursery to stable group using `just move-rule stable ruleName`

Applied to files:

  • crates/biome_configuration/src/analyzer/linter/rules.rs
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
📚 Learning: applies to biome_configuration/src/**/*.rs : configuration files must be placed in `biome_configurat...
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.386Z
Learning: Applies to biome_configuration/src/**/*.rs : Configuration files must be placed in `biome_configuration/src/`

Applied to files:

  • crates/biome_configuration/src/analyzer/linter/rules.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). (11)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-4)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_formatter)
🔇 Additional comments (32)
crates/biome_rule_options/src/lib.rs (1)

128-128: LGTM! Module export follows established conventions.

The new module export is correctly placed in alphabetical order and follows the snake_case naming convention consistent with other rule option modules.

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1)

1-5: LGTM! Valid test case correctly demonstrates when rule should not trigger.

This test properly validates that async components without the "use client" directive should not generate diagnostics, which aligns with the rule's intended behavior to only flag async client components.

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx (1)

1-5: LGTM! Invalid test case correctly demonstrates the rule violation.

This test properly validates that async client components (marked with "use client") should trigger the lint rule, which aligns with Next.js best practices that discourage async client components due to hydration issues.

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx (1)

1-6: LGTM! Additional test case provides good coverage for export syntax variants.

This test correctly validates that the rule catches async client components regardless of whether the function is declared inline with export default or separately. Good coverage for different syntax patterns.

crates/biome_diagnostics_categories/src/categories.rs (1)

149-149: LGTM! Diagnostic category properly registered.

The new diagnostic category is correctly placed in alphabetical order within the nursery lint rules and follows the established URL pattern for Biome documentation.

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx (1)

1-6: Test case looks correct and self-descriptive

The positive test accurately captures a synchronous client component scenario and should not trigger the rule. No further action required.

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx (1)

1-6: Good negative-case coverage

This file ensures the rule does not mis-fire on async functions that are not React components. Looks good.

crates/biome_js_analyze/src/lint/nursery.rs (1)

62-62: Rule wired into Nursery group properly

The rule is registered in the lint group with correct camelCase naming. No issues spotted.

.changeset/shaggy-keys-camp.md (1)

5-21: Clear, reader-friendly changeset entry

The wording is concise, the link resolves to the expected docs path, and the code examples illustrate both invalid and valid patterns. ✅

crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs (1)

64-75: LGTM! Generated code follows established patterns correctly.

The new match arm for "@next/no-async-client-component" correctly implements the standard nursery rule migration pattern. The rule name conversion from kebab-case to snake_case is appropriate, and the logic is consistent with other nursery rules in the file.

Since this is generated code (as noted in line 1), any issues should be addressed in the code generation tooling rather than manual edits.

packages/@biomejs/backend-jsonrpc/src/workspace.ts (5)

1606-1609: LGTM! Follows established patterns correctly.

The JSDoc documentation is clear and the property declaration follows the same pattern as other lint rules in the interface. The camelCase naming convention aligns with the project's standards.


2926-2928: LGTM! Type alias follows established pattern.

The type definition is consistent with other rule configuration type aliases in the file, providing the standard union of plain and options-based configurations.


5226-5235: LGTM! Interface definition follows established structure.

The RuleWithOptions_for_NoNextAsyncClientComponentOptions interface maintains consistency with other rule option interfaces, including proper JSDoc documentation and standard property definitions.


7864-7864: LGTM! Empty options interface follows standard pattern.

The empty NoNextAsyncClientComponentOptions interface is consistent with other lint rules that don't require configuration options and is properly positioned alphabetically.


8547-8547: LGTM! Rule properly categorized in nursery.

The addition to the Category union type correctly places the new rule in the nursery category with proper naming convention that matches other nursery rules.

packages/@biomejs/biome/configuration_schema.json (2)

3625-3634: Definition entries look consistent and follow existing conventions

NoNextAsyncClientComponentConfiguration and its companion Options entry are added in the same pattern as neighbouring rule definitions (NoNodejsModulesConfiguration, etc.). Naming (PascalCase for definitions, camelCase for rule name) and the additionalProperties: false guard are both correct.


4865-4870: Rule correctly surfaced in the nursery group

The noNextAsyncClientComponent property is wired into the nursery rules section with a clear description and the expected anyOf pointing at the new configuration definition. No issues spotted.

crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (3)

1-12: Imports are well-organized and appropriate.

The import structure follows the expected pattern for a Biome lint rule implementation, with all necessary dependencies properly imported.


13-60: Rule declaration is well-documented and properly configured.

The rule metadata, documentation, and examples effectively communicate the rule's purpose and usage. The configuration appropriately targets Next.js applications with warning severity.


145-153: Helper function is well-implemented.

The has_use_client_directive function efficiently checks for the presence of "use client" directives with proper error handling and early termination.

crates/biome_configuration/src/analyzer/linter/rules.rs (12)

215-215: LGTM - Enum variant correctly added.

The NoNextAsyncClientComponent variant is properly added to the RuleName enum in alphabetical order and follows the camelCase naming convention.


565-565: LGTM - String representation correctly mapped.

The string representation mapping for NoNextAsyncClientComponent is correct and follows the camelCase convention.


915-915: LGTM - Rule correctly assigned to Nursery group.

The NoNextAsyncClientComponent rule is properly assigned to the RuleGroup::Nursery, which is the correct group for new lint rules.


1270-1270: LGTM - FromStr implementation correctly added.

The FromStr implementation for "noNextAsyncClientComponent" is properly added and matches the string representation.


4301-4301: LGTM - Nursery struct field correctly added.

The no_next_async_client_component field is properly added to the Nursery struct with the correct type, documentation, and serde attributes. The snake_case naming follows Rust conventions.


4318-4318: LGTM - GROUP_RULES array correctly updated.

The "noNextAsyncClientComponent" string is properly added to the GROUP_RULES array in alphabetical order.


4369-4378: LGTM - RECOMMENDED_RULES_AS_FILTERS indices correctly adjusted.

The indices in the RECOMMENDED_RULES_AS_FILTERS array have been properly incremented to account for the insertion of the new rule at index 13 in the GROUP_RULES array. The adjustments maintain the correct mapping to the intended rules.


4441-4441: LGTM - ALL_RULES_AS_FILTERS correctly updated.

The addition of GROUP_RULES[60] to the ALL_RULES_AS_FILTERS array correctly includes the new total count of rules after the insertion.


4518-4757: LGTM - get_enabled_rules method correctly updated.

The get_enabled_rules method has been systematically updated to:

  1. Add the check for no_next_async_client_component at the correct index (13)
  2. Increment all subsequent rule indices by 1 to maintain proper mapping

The changes are consistent and maintain the correct correspondence between struct fields and GROUP_RULES array indices.


4827-5066: LGTM - get_disabled_rules method correctly updated.

The get_disabled_rules method has been systematically updated with the same pattern as get_enabled_rules, maintaining consistency in rule index handling between enabled and disabled states.


5149-5152: LGTM - get_rule_configuration method correctly updated.

The get_rule_configuration method properly handles the new "noNextAsyncClientComponent" rule by mapping it to the corresponding struct field and returning the configuration.


5362-5362: LGTM - From trait implementation correctly updated.

The From<GroupPlainConfiguration> implementation properly initializes the no_next_async_client_component field, maintaining consistency with other rules in the Nursery group.

@dyc3
Copy link
Contributor

dyc3 commented Aug 5, 2025

@Jayllyz sorry for the extra noise from the bot

@Jayllyz Jayllyz force-pushed the feat/no-async-client-component branch from ca938ed to 5714696 Compare August 8, 2025 13:06
Copy link
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

♻️ Duplicate comments (2)
crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (2)

131-132: Grammar nit in fallback message

Use plural “components” and fix the article.

-                        "Async client component are not allowed."
+                        "Async client components are not allowed."

89-98: Extend async detection to all component declaration patterns (missing cases)

Currently only JsFunctionDeclaration and JsFunctionExportDefaultDeclaration are checked. This misses async arrow functions, variable declarators, assignments, export default expressions, and object/class method forms that ReactComponentInfo can surface.

Apply this diff to cover all variants of AnyPotentialReactComponentDeclaration:

-        // Check if the component function is async
-        let is_async = match declaration {
-            AnyPotentialReactComponentDeclaration::JsFunctionDeclaration(func) => {
-                func.async_token().is_some()
-            }
-            AnyPotentialReactComponentDeclaration::JsFunctionExportDefaultDeclaration(func) => {
-                func.async_token().is_some()
-            }
-            _ => false,
-        };
+        // Check if the component function is async across all declaration patterns
+        let is_async = match declaration {
+            AnyPotentialReactComponentDeclaration::JsFunctionDeclaration(func) => {
+                func.async_token().is_some()
+            }
+            AnyPotentialReactComponentDeclaration::JsFunctionExportDefaultDeclaration(func) => {
+                func.async_token().is_some()
+            }
+            AnyPotentialReactComponentDeclaration::JsVariableDeclarator(declarator) => {
+                declarator
+                    .initializer()
+                    .ok()
+                    .and_then(|init| init.expression().ok())
+                    .map_or(false, |expr| match expr {
+                        biome_js_syntax::AnyJsExpression::JsFunctionExpression(func) => {
+                            func.async_token().is_some()
+                        }
+                        biome_js_syntax::AnyJsExpression::JsArrowFunctionExpression(arrow) => {
+                            arrow.async_token().is_some()
+                        }
+                        _ => false,
+                    })
+            }
+            AnyPotentialReactComponentDeclaration::JsAssignmentExpression(assign) => {
+                assign.right().ok().map_or(false, |expr| match expr {
+                    biome_js_syntax::AnyJsExpression::JsFunctionExpression(func) => {
+                        func.async_token().is_some()
+                    }
+                    biome_js_syntax::AnyJsExpression::JsArrowFunctionExpression(arrow) => {
+                        arrow.async_token().is_some()
+                    }
+                    _ => false,
+                })
+            }
+            AnyPotentialReactComponentDeclaration::JsExportDefaultExpressionClause(export) => {
+                export.expression().ok().map_or(false, |expr| match expr {
+                    biome_js_syntax::AnyJsExpression::JsFunctionExpression(func) => {
+                        func.async_token().is_some()
+                    }
+                    biome_js_syntax::AnyJsExpression::JsArrowFunctionExpression(arrow) => {
+                        arrow.async_token().is_some()
+                    }
+                    _ => false,
+                })
+            }
+            AnyPotentialReactComponentDeclaration::JsMethodObjectMember(method) => {
+                method.async_token().is_some()
+            }
+            AnyPotentialReactComponentDeclaration::JsPropertyObjectMember(prop) => {
+                match prop.value() {
+                    Ok(biome_js_syntax::AnyJsObjectMemberValue::AnyJsExpression(expr)) => match expr {
+                        biome_js_syntax::AnyJsExpression::JsFunctionExpression(func) => {
+                            func.async_token().is_some()
+                        }
+                        biome_js_syntax::AnyJsExpression::JsArrowFunctionExpression(arrow) => {
+                            arrow.async_token().is_some()
+                        }
+                        _ => false,
+                    },
+                    _ => false,
+                }
+            }
+            AnyPotentialReactComponentDeclaration::JsMethodClassMember(method) => {
+                method.async_token().is_some()
+            }
+            _ => false,
+        };

If you decide object/class methods aren’t considered “components” for this rule, keep the other arms and drop those two; ReactComponentInfo already gates most false positives.

Happy to push a commit with this change if you prefer.

🧹 Nitpick comments (2)
crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (2)

118-124: Point diagnostic at the async keyword for better UX

Instead of highlighting the entire declaration, consider using the async token’s range when available; users will love the laser pointer.

Example approach (sketch, not a drop-in):

let (range, message) = match declaration {
    AnyPotentialReactComponentDeclaration::JsFunctionDeclaration(func) => {
        (func.async_token().map(|t| t.text_range()).unwrap_or(declaration.range()), msg)
    }
    // ...mirror for other variants...
    _ => (declaration.range(), msg),
};

RuleDiagnostic::new(rule_category!(), range, markup! { /* message */ })

21-49: Docs: add an invalid arrow/variable example

Show that async arrow components in client modules are disallowed too.

Suggested snippet to add under “Invalid”:

"use client";

export const MyComponent = async () => {
  return <div>Hello</div>;
};
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca938ed and 5714696.

⛔ Files ignored due to path filters (6)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.js.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx.snap is excluded by !**/*.snap
📒 Files selected for processing (15)
  • .changeset/shaggy-keys-camp.md (1 hunks)
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs (1 hunks)
  • crates/biome_configuration/src/analyzer/linter/rules.rs (12 hunks)
  • crates/biome_diagnostics_categories/src/categories.rs (1 hunks)
  • crates/biome_js_analyze/src/lint/nursery.rs (2 hunks)
  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx (1 hunks)
  • crates/biome_rule_options/src/lib.rs (1 hunks)
  • crates/biome_rule_options/src/no_next_async_client_component.rs (1 hunks)
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts (5 hunks)
  • packages/@biomejs/biome/configuration_schema.json (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_js_analyze/src/lint/nursery.rs
🚧 Files skipped from review as they are similar to previous changes (13)
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalidExportDef.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNoAsync.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/validNotComponent.jsx
  • .changeset/shaggy-keys-camp.md
  • crates/biome_rule_options/src/no_next_async_client_component.rs
  • crates/biome_configuration/src/analyzer/linter/rules.rs
  • crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs
  • crates/biome_diagnostics_categories/src/categories.rs
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts
  • packages/@biomejs/biome/configuration_schema.json
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{rs,toml}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Format code (Rust + TOML) using just format

Format Rust and TOML files using just f (alias for just format).

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
crates/biome_*/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Core crates must be located in /crates/biome_*/

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
**/*.rs

📄 CodeRabbit Inference Engine (CONTRIBUTING.md)

Update documentation for new features or changes, using inline rustdoc for rules, assists, and their options.

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: You are encouraged to split the work for a new rule into multiple PRs and describe your plan in an issue if unfamiliar with Biome's APIs.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: If you implement a new feature that affects end users, send a PR to the `next` branch.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: If you promote a rule from nursery, send a PR to the `next` branch.
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.395Z
Learning: Create new lint rules using `just new-js-lintrule`, `just new-css-lintrule`, `just new-json-lintrule`, or `just new-graphql-lintrule`, and the rule name must be camelCase
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to crates/biome_lint_rules/**/*.rs : Linter rules must have a `version` metadata field in their implementation, set to "next" for new rules and updated to the new version when releasing.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Update the `language` field in `declare_lint_rule!` to match the language the rule applies to (e.g., `js`, `jsx`, `ts`, `tsx`).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a lint rule is ported from another ecosystem (e.g., ESLint), add a `sources` metadata field in `declare_lint_rule!` referencing the original rule.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `version` field in `declare_lint_rule!` must be set to `next` for new rules.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/{use*,no*}_*{vue,react,angular,svelte}*.rs : If a rule overwhelmingly applies to a specific framework, it should be named using the `use<Framework>...` or `no<Framework>...` pattern (e.g., `noVueReservedProps`).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no*_*.rs : Rules that forbid a single concept should be named using the `no<Concept>` prefix (e.g., `noDebugger` for disallowing `debugger` statements).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : New rules must be placed inside the `nursery` group for incubation before promotion.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When deprecating a rule, specify the reason using the `deprecated:` field in the `declare_lint_rule!` macro.
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/{use*,no*}_*{vue,react,angular,svelte}*.rs : If a rule overwhelmingly applies to a specific framework, it should be named using the `use<Framework>...` or `no<Framework>...` pattern (e.g., `noVueReservedProps`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a lint rule is ported from another ecosystem (e.g., ESLint), add a `sources` metadata field in `declare_lint_rule!` referencing the original rule.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Update the `language` field in `declare_lint_rule!` to match the language the rule applies to (e.g., `js`, `jsx`, `ts`, `tsx`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `version` field in `declare_lint_rule!` must be set to `next` for new rules.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When deprecating a rule, specify the reason using the `deprecated:` field in the `declare_lint_rule!` macro.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : New rules must be placed inside the `nursery` group for incubation before promotion.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `declare_lint_rule!` macro must be used to declare an analyzer rule type and implement the RuleMeta trait.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a rule provides a code action, add the `fix_kind` metadata to the `declare_lint_rule!` macro and implement the `action` function.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:49:35.574Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to crates/biome_lint_rules/**/*.rs : Linter rules must have a `version` metadata field in their implementation, set to "next" for new rules and updated to the new version when releasing.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no_redundant*_*.rs : Rules that report redundant code should use the `noRedundant<Concept>` naming convention (e.g., `noRedundantUseStrict`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When banning certain functions or variables, always check if the variable is global using the semantic model to avoid false positives.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Each code block in rule documentation must specify a language and use `expect_diagnostic` for invalid examples.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When a rule requires semantic information, use the `Semantic<>` query type and access the semantic model via `ctx.model()`.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no*_*.rs : Rules that forbid a single concept should be named using the `no<Concept>` prefix (e.g., `noDebugger` for disallowing `debugger` statements).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.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). (26)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Check JS Files
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
🔇 Additional comments (3)
crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (3)

145-153: LGTM: robust "use client" directive detection

inner_string_text() makes this resilient to quoting styles; concise and clear.


51-59: Verify language field consistency for Next async client component rule

I couldn’t find other language values via the initial search—please double-check the project convention for Next/React rules to ensure we’re not missing JSX/TSX support.

  • File:
    crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (lines 51–59)
    language: "js" – confirm if this should also cover "jsx"/"tsx".
  • Scan other Next/React lint rules for their language settings.
#!/bin/bash
# List all language fields in JS/React/Next lint rules
rg -n 'declare_lint_rule!' -A5 crates/biome_js_analyze/src/lint \
  | rg -C2 'language:' || echo "No matches found—please verify manually."

13-60: Housekeeping: regenerate & format, then sharpen your sanity‐check script

  • Run
    just gen-all && just f
  • To catch real Git conflict markers (and not every “=====…” in your snapshots), use strict anchors:
    rg -n '^(<<<<<<< |>>>>>>> )'
    rg -n '^=======$'
  • To flag stray debug or TODOs only in your source (and not in generated tests), scope your grep:
    rg -n --type rust '\b(todo!\(|dbg!\()' crates/biome_js_analyze/src
⛔ Skipped due to learnings
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to **/*.{rs,toml} : Format Rust and TOML files using `just f` (alias for `just format`).
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.395Z
Learning: Applies to **/*.{rs,toml} : Format code (Rust + TOML) using `just format`
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Format your code with `just f` and lint with `just l` before committing.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Test rules using quick tests in the appropriate test file (e.g., `biome_js_analyze/tests/quick_test.rs`) and snapshot tests in `tests/specs/`.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:56.365Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : Update the `spec_tests.rs` file to generate a test function for each `.html` file found inside `tests/specs/html` using the `tests_macros::gen_tests!` macro.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:51:05.640Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Use the `dbg_write!` macro to output the written IR elements to the console for debugging formatter output.
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.395Z
Learning: Applies to xtask/codegen/*.ungram : When adding new syntax nodes or rules, modify the appropriate `.ungram` file in `xtask/codegen/` and run `just gen-all` to regenerate code
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to **/*.rs : Update documentation for new features or changes, using inline rustdoc for rules, assists, and their options.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Avoid deep indentation by using combinators like `map`, `filter`, and `and_then` instead of nested `if let` or `match` statements.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Use Rust's `dbg!()` macro for debugging and pass `--show-output` to `cargo` to display debug output during tests.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `declare_lint_rule!` macro must be used to declare an analyzer rule type and implement the RuleMeta trait.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/{use*,no*}_*{vue,react,angular,svelte}*.rs : If a rule overwhelmingly applies to a specific framework, it should be named using the `use<Framework>...` or `no<Framework>...` pattern (e.g., `noVueReservedProps`).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no*_*.rs : Rules that forbid a single concept should be named using the `no<Concept>` prefix (e.g., `noDebugger` for disallowing `debugger` statements).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `version` field in `declare_lint_rule!` must be set to `next` for new rules.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Each code block in rule documentation must specify a language and use `expect_diagnostic` for invalid examples.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When deprecating a rule, specify the reason using the `deprecated:` field in the `declare_lint_rule!` macro.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a lint rule is ported from another ecosystem (e.g., ESLint), add a `sources` metadata field in `declare_lint_rule!` referencing the original rule.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `rule_category!` macro should be used in diagnostics to statically inject the category at compile time.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to crates/biome_lint_rules/**/*.rs : Linter rules must have a `version` metadata field in their implementation, set to "next" for new rules and updated to the new version when releasing.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no_restricted*_*.rs : Rules that report restricted entities should use the `noRestricted<Concept>` naming convention (e.g., `noRestrictedGlobals`).

@Jayllyz Jayllyz changed the title feat(analyse/js): add noNextAsyncClientComponent rule in Next domain feat(analyze/js): add noNextAsyncClientComponent rule in Next domain Aug 8, 2025
Copy link
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: 2

🧹 Nitpick comments (3)
crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (2)

171-177: Grammar nit: pluralise “component”.

"Async client component are not allowed.""Async client components are not allowed."


73-76: Match arms for object/class members are never hit.

The guard on Lines 73-76 exits early for non-Function kinds, so the later match arms for JsMethodObjectMember, JsPropertyObjectMember, and JsMethodClassMember can’t execute. Either drop the guard or remove the dead arms to keep the rule lean.

Also applies to: 126-140

crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx (1)

3-5: Consider adding default-export async arrow case.

The ESLint sibling also forbids

export default async () => {}
export default (async () => {})

Adding them here would future-proof the test suite.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5714696 and daede66.

⛔ Files ignored due to path filters (2)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx.snap is excluded by !**/*.snap
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx (1 hunks)
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{rs,toml}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Format code (Rust + TOML) using just format

Format Rust and TOML files using just f (alias for just format).

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
crates/biome_*/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Core crates must be located in /crates/biome_*/

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx
  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/invalid.jsx
**/*.rs

📄 CodeRabbit Inference Engine (CONTRIBUTING.md)

Update documentation for new features or changes, using inline rustdoc for rules, assists, and their options.

Files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: You are encouraged to split the work for a new rule into multiple PRs and describe your plan in an issue if unfamiliar with Biome's APIs.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: If you implement a new feature that affects end users, send a PR to the `next` branch.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: If you promote a rule from nursery, send a PR to the `next` branch.
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to crates/biome_lint_rules/**/*.rs : Linter rules must have a `version` metadata field in their implementation, set to "next" for new rules and updated to the new version when releasing.
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-05T13:25:32.395Z
Learning: Create new lint rules using `just new-js-lintrule`, `just new-css-lintrule`, `just new-json-lintrule`, or `just new-graphql-lintrule`, and the rule name must be camelCase
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `version` field in `declare_lint_rule!` must be set to `next` for new rules.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a lint rule is ported from another ecosystem (e.g., ESLint), add a `sources` metadata field in `declare_lint_rule!` referencing the original rule.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Update the `language` field in `declare_lint_rule!` to match the language the rule applies to (e.g., `js`, `jsx`, `ts`, `tsx`).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : New rules must be placed inside the `nursery` group for incubation before promotion.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/{use*,no*}_*{vue,react,angular,svelte}*.rs : If a rule overwhelmingly applies to a specific framework, it should be named using the `use<Framework>...` or `no<Framework>...` pattern (e.g., `noVueReservedProps`).
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When deprecating a rule, specify the reason using the `deprecated:` field in the `declare_lint_rule!` macro.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a rule provides a code action, add the `fix_kind` metadata to the `declare_lint_rule!` macro and implement the `action` function.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `declare_lint_rule!` macro must be used to declare an analyzer rule type and implement the RuleMeta trait.
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/{use*,no*}_*{vue,react,angular,svelte}*.rs : If a rule overwhelmingly applies to a specific framework, it should be named using the `use<Framework>...` or `no<Framework>...` pattern (e.g., `noVueReservedProps`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a lint rule is ported from another ecosystem (e.g., ESLint), add a `sources` metadata field in `declare_lint_rule!` referencing the original rule.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Update the `language` field in `declare_lint_rule!` to match the language the rule applies to (e.g., `js`, `jsx`, `ts`, `tsx`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `version` field in `declare_lint_rule!` must be set to `next` for new rules.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : New rules must be placed inside the `nursery` group for incubation before promotion.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When deprecating a rule, specify the reason using the `deprecated:` field in the `declare_lint_rule!` macro.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : The `declare_lint_rule!` macro must be used to declare an analyzer rule type and implement the RuleMeta trait.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : If a rule provides a code action, add the `fix_kind` metadata to the `declare_lint_rule!` macro and implement the `action` function.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:49:35.574Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:49:35.574Z
Learning: Applies to crates/biome_lint_rules/**/*.rs : Linter rules must have a `version` metadata field in their implementation, set to "next" for new rules and updated to the new version when releasing.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no_redundant*_*.rs : Rules that report redundant code should use the `noRedundant<Concept>` naming convention (e.g., `noRedundantUseStrict`).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When banning certain functions or variables, always check if the variable is global using the semantic model to avoid false positives.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/tests/specs/*/*/*.jsonc : Files ending with `.jsonc` in snapshot tests should contain arrays of code snippets for script environments.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Test rules using quick tests in the appropriate test file (e.g., `biome_js_analyze/tests/quick_test.rs`) and snapshot tests in `tests/specs/`.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : Each code block in rule documentation must specify a language and use `expect_diagnostic` for invalid examples.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When a rule requires semantic information, use the `Semantic<>` query type and access the semantic model via `ctx.model()`.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/*.rs : When implementing the `run` function for a rule, prefer transforming `Result` into `Option` and using the `?` operator for concise code.

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:50:18.454Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: Applies to crates/biome_analyze/biome_*/lib/src/lint/nursery/no*_*.rs : Rules that forbid a single concept should be named using the `no<Concept>` prefix (e.g., `noDebugger` for disallowing `debugger` statements).

Applied to files:

  • crates/biome_js_analyze/src/lint/nursery/no_next_async_client_component.rs
📚 Learning: 2025-08-05T14:51:59.193Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:51:59.193Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Add end-to-end tests for watcher functionality in LSP tests (../biome_lsp/src/server.tests.rs)

Applied to files:

  • crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx
⏰ 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: Bench (biome_js_parser)
  • GitHub Check: Documentation
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_html_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_html_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test Node.js API
  • GitHub Check: Check JS Files
  • GitHub Check: autofix
🔇 Additional comments (1)
crates/biome_js_analyze/tests/specs/nursery/noNextAsyncClientComponent/valid.jsx (1)

1-33: Good coverage of async server patterns

Nice spread (declaration, arrow, function expression, object/class methods). This squarely exercises allowed server-side async shapes.

@ematipico ematipico merged commit a081bbe into biomejs:main Aug 8, 2025
30 of 31 checks passed
@github-actions github-actions bot mentioned this pull request Aug 8, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 8, 2025
@Jayllyz Jayllyz deleted the feat/no-async-client-component branch August 10, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载