Skip to content

chore: main into next - #10142

Merged
Netail merged 29 commits into
nextfrom
chore/main-into-next
Apr 28, 2026
Merged

Netail merged 29 commits into
nextfrom
chore/main-into-next

Conversation

@Netail

@Netail Netail commented Apr 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Main into next

Important

Don't use squash merge

Test Plan

Docs

tidefield and others added 28 commits April 24, 2026 06:13
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

Co-authored-by: dyc3 <1808807+dyc3@users.noreply.github.com>
Co-authored-by: Conaclos <2358560+Conaclos@users.noreply.github.com>
Co-authored-by: nhedger <649677+nhedger@users.noreply.github.com>
…@const} blocks (#10079)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
… expression (#10080)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
<!--
  IMPORTANT!!
  If you generated this PR with the help of any AI assistance, please disclose it in the PR.
  https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#ai-assistance-notice
-->

<!--
	Thanks for submitting a Pull Request! We appreciate you spending the time to work on these changes.
	Please provide enough information so that others can review your PR.
	Once created, your PR will be automatically labeled according to changed files.
	Learn more about contributing: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md
-->

## Summary

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve?-->
Ports `prefer-hooks-on-top` from jest/vitest eslint plugins.

Generated with gpt 5.5

<!-- Link any relevant issues if necessary or include a transcript of any Discord discussion. -->

<!-- If you create a user-facing change, please write a changeset: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#writing-a-changeset (your changeset is often a good starting point for this summary as well) -->

## Test Plan

<!-- What demonstrates that your implementation is correct? -->
snapshots

## Docs

<!-- If you're submitting a new rule or action (or an option for them), the documentation is part of the code. Make sure rules and actions have example usages, and that all options are documented. -->

<!-- For other features, please submit a documentation PR to the `next` branch of our website: https://github.com/biomejs/website/. Link the PR here once it's ready. -->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
<!--
  IMPORTANT!!
  If you generated this PR with the help of any AI assistance, please disclose it in the PR.
  https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#ai-assistance-notice
-->

<!--
	Thanks for submitting a Pull Request! We appreciate you spending the time to work on these changes.
	Please provide enough information so that others can review your PR.
	Once created, your PR will be automatically labeled according to changed files.
	Learn more about contributing: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md
-->

## Summary

v-for parsing now handles nested destructuring

follow up to #8620

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve?-->

<!-- Link any relevant issues if necessary or include a transcript of any Discord discussion. -->

<!-- If you create a user-facing change, please write a changeset: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#writing-a-changeset (your changeset is often a good starting point for this summary as well) -->

## Test Plan

<!-- What demonstrates that your implementation is correct? -->

## Docs

<!-- If you're submitting a new rule or action (or an option for them), the documentation is part of the code. Make sure rules and actions have example usages, and that all options are documented. -->

<!-- For other features, please submit a documentation PR to the `next` branch of our website: https://github.com/biomejs/website/. Link the PR here once it's ready. -->
<!--
  IMPORTANT!!
  If you generated this PR with the help of any AI assistance, please disclose it in the PR.
  https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#ai-assistance-notice
-->

<!--
	Thanks for submitting a Pull Request! We appreciate you spending the time to work on these changes.
	Please provide enough information so that others can review your PR.
	Once created, your PR will be automatically labeled according to changed files.
	Learn more about contributing: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md
-->

## Summary

follow up to #8620

closes #9075

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve?-->

<!-- Link any relevant issues if necessary or include a transcript of any Discord discussion. -->

<!-- If you create a user-facing change, please write a changeset: https://github.com/biomejs/biome/blob/main/CONTRIBUTING.md#writing-a-changeset (your changeset is often a good starting point for this summary as well) -->

## Test Plan

<!-- What demonstrates that your implementation is correct? -->

## Docs

<!-- If you're submitting a new rule or action (or an option for them), the documentation is part of the code. Make sure rules and actions have example usages, and that all options are documented. -->

<!-- For other features, please submit a documentation PR to the `next` branch of our website: https://github.com/biomejs/website/. Link the PR here once it's ready. -->
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
@changeset-bot

changeset-bot Bot commented Apr 27, 2026 •

Copy link
Copy Markdown

πŸ¦‹ Changeset detected

Latest commit: 773418b

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 the A-CLI Area: CLI label Apr 27, 2026
@github-actions github-actions Bot added A-Project Area: project A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS and super languages A-Diagnostic Area: diagnostocis L-HTML Language: HTML and super languages A-Resolver Area: resolver L-Markdown Language: Markdown labels Apr 27, 2026
@Netail Netail changed the title main into next chore: main into next Apr 27, 2026
@codspeed

codspeed Bot commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

βœ… 249 untouched benchmarks


Comparing chore/main-into-next (773418b) with next (9c7c6eb)

Open in CodSpeed

@Netail
Netail force-pushed the chore/main-into-next branch from 4f4aea1 to 773418b Compare April 27, 2026 21:22
@coderabbitai

coderabbitai Bot commented Apr 27, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a large set of changes across linting, parsing, formatting, resolver and tooling metadata. Notable facts: introduces nursery lint useTestHooksOnTop; implements full Vue v-for lexer/parser/formatter support and tests; extends noShadow with two TypeScript-aware options and tests; recognises new CSS corner-shape properties and squircle/superellipse functions; treats @scope as an at-rule context in CSS analysis; accepts surrogate code points in \u{...} string escapes; expands Svelte {@const} handling and related embedding; updates ESLint→Biome migration for @typescript-eslint/no-shadow; and adds governance, dependency and various test/fixture updates.

Possibly related PRs

Suggested reviewers

  • dyc3
πŸš₯ Pre-merge checks | βœ… 4
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title 'chore: main into next' clearly describes a merge integration between branches, which aligns with the changeset containing numerous fixes, features, and dependency updates across the codebase.
Description check βœ… Passed The description mentions 'Main into next' and references the changeset scope, though it lacks detailed implementation notes. It remains related to the actual changes being merged and includes merge-instruction guidance.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/main-into-next

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs (1)

201-213: ⚠️ Potential issue | 🟑 Minor

Preserve the char-class note on this path.

This branch now reports the - case, but in_char_class: false skips the character-class-specific diagnostic note for -. Set it to true so the new edge case gets the same guidance as the existing \- path.

πŸ”§ Proposed fix
-                                        in_char_class: false,
+                                        in_char_class: true,
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs`
around lines 201 - 213, The branch that returns Some(State { backslash_index:
(index - 2) as u16, escaped: b'-', in_char_class: false }) is incorrectly
setting in_char_class to false, which prevents the char-class-specific
diagnostic note for '-' from appearing; update that return in the same
function/branch to set in_char_class: true so this edge case produces the same
character-class guidance as the existing `\\-` path (i.e., change the State
construction for the '-' case to use in_char_class: true).
crates/biome_html_analyze/src/lint/a11y/no_access_key.rs (1)

99-103: ⚠️ Potential issue | 🟠 Major

Use case-insensitive matching for HTML attribute names.

accessKey is case-insensitive in HTML, so this exact-lowercase check will miss mixed-case spellings and let invalid markup slip through.

♻️ Suggested fix
 fn is_accesskey_attribute(node: &HtmlAttribute) -> bool {
     node.name().is_ok_and(|name| {
-        name.value_token().is_ok_and(|value_token| value_token.text_trimmed() == "accesskey")
+        name.value_token().is_ok_and(|value_token| {
+            value_token.text_trimmed().eq_ignore_ascii_case("accesskey")
+        })
     })
 }
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_html_analyze/src/lint/a11y/no_access_key.rs` around lines 99 -
103, The check in is_accesskey_attribute currently compares the attribute name
with the exact lowercase "accesskey", which fails for mixed-case HTML
attributes; update is_accesskey_attribute to perform a case-insensitive
comparison by retrieving the attribute name token (via
name().value_token().text_trimmed()) and comparing with "accesskey" using a
case-insensitive method (e.g., eq_ignore_ascii_case or to_ascii_lowercase() ==
"accesskey") so mixed-case forms like "accessKey" or "ACCESSKEY" are correctly
detected.
crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs (1)

240-255: ⚠️ Potential issue | 🟠 Major

Skip v-for in the generic Vue directive pass.

Nice catch adding VueVForValue, but this branch still reparses the whole v-for value as plain JS. For forms like item in items or destructuring aliases, that can reintroduce false parse/undeclared-variable diagnostics even though the iterable expression is now handled separately. Please special-case v-for here and add a Vue regression next to the new Svelte cases.

πŸ’‘ Minimal fix
                 if let Some(directive) = VueDirective::cast_ref(&element)
                     && let Some(initializer) = directive.initializer()
                 {
+                    if directive
+                        .name_token()
+                        .map(|token| token.text_trimmed() == "v-for")
+                        .unwrap_or(false)
+                    {
+                        continue;
+                    }
+
                     let is_v_on = directive
                         .name_token()
                         .map(|t| t.text_trimmed() == "v-on")
                         .unwrap_or(false);
                     if let Some(candidate) = build_vue_directive_candidate(&initializer, is_v_on) {

As per coding guidelines, "All code changes MUST include appropriate tests: lint rules require snapshot tests in 'tests/specs/{group}/{rule}/', formatters require snapshot tests with valid/invalid cases, parsers require test files covering valid and error cases, and bug fixes require tests that reproduce and validate the fix."

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs` around
lines 240 - 255, The generic Vue directive pass currently reparses v-for values
as plain JS; inside the branch that checks VueDirective::cast_ref(&element) and
uses directive.initializer(), detect and skip directives whose name_token()
equals "v-for" (or whose directive kind corresponds to VueVForValue) so you do
NOT call build_vue_directive_candidate(&initializer, is_v_on) for v-for; instead
bypass this block for v-for to avoid re-parsing the v-for pattern, and add a
regression snapshot test next to the new Svelte cases (under tests/specs/… for
the relevant rule/group) that includes a v-for with "item in items" and a
destructuring example to assert no false parse/undeclared-variable diagnostics.
🧹 Nitpick comments (2)
GOVERNANCE.md (1)

159-160: Clarify merge rights vs mandatory checks.
Line 159 could be read as β€œmerge with zero gatekeeping”. Consider explicitly stating that required CI/status checks still apply, even when prior approval is skipped.

Suggested wording tweak
-- The ability to merge PRs without approval, as long as post-merge reviews are addressed in another PR. Contractors are considered masters in their craft, so their contributions should be considered in line with Biome values and their work.
+- The ability to merge PRs without prior approval, provided required status checks pass; any post-merge review feedback must be addressed in a follow-up PR.
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@GOVERNANCE.md` around lines 159 - 160, The clause "The ability to merge PRs
without approval, as long as post-merge reviews are addressed in another PR" can
be misread as allowing merges that bypass mandatory checks; update this sentence
to explicitly state that required CI/status checks and branch protection rules
still apply even when prior approvals are skipped (e.g., append "provided all
required CI/status checks and branch protection rules are satisfied prior to
merge"); locate and edit the sentence starting "The ability to merge PRs without
approval..." in GOVERNANCE.md and add the explicit reference to required checks
and branch protection so it's unambiguous.
crates/biome_js_analyze/src/frameworks/unit_tests.rs (1)

462-470: Tiny DRY tidy-up for tests.

first_describe_call is identical to first_call; consider reusing one helper to keep the test module lean (future-you will thank present-you).

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/frameworks/unit_tests.rs` around lines 462 - 470,
The helper first_describe_call duplicates first_call; remove the duplicate by
having callers use first_call (or by implementing first_describe_call to
delegate to first_call) and delete the redundant function definition (update all
references to first_describe_call to call first_call). This keeps the test
module DRY while retaining the same behavior; reference the two helpers
first_describe_call and first_call when making the change.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/add-use-test-hooks-on-top.md:
- Line 2: Update the changeset entry for the new user-facing rule by changing
the release type from "patch" to "minor" for the package identifier
"@biomejs/biome": replace the value "patch" with "minor" so the changeset
correctly signals a minor release for the new feature.

In @.changeset/nine-lizards-sleep.md:
- Around line 1-3: Update the changeset front-matter to use a minor release
instead of patch: in the YAML block where "@biomejs/biome" is set to "patch",
change that value to "minor" so the non-breaking addition to the next branch is
released as a minor version.

In @.changeset/tasty-experts-fail.md:
- Around line 1-9: The changeset currently marks the release as "patch" for the
package entry '"@biomejs/biome": patch' but adds new user-facing options
(ignoreFunctionTypeParameterNameValueShadow and ignoreTypeValueShadow), so
update the changeset to use "minor" instead of "patch" for the "@biomejs/biome"
entry; locate the changeset file containing the YAML header with
'"@biomejs/biome": patch' and replace "patch" with "minor" so the release type
reflects a non-breaking feature addition.

In `@crates/biome_cli/src/execute/migrate/eslint_typescript.rs`:
- Around line 656-670: The NoShadowOptions struct is missing deserialization
rename mappings so camelCase JSON keys are not mapped to the snake_case Rust
fields; update the struct (NoShadowOptions) to annotate each field with
#[deserializable(rename = "ignoreTypeValueShadow")] and #[deserializable(rename
= "ignoreFunctionTypeParameterNameValueShadow")] respectively so deserialization
populates ignore_type_value_shadow and
ignore_function_type_parameter_name_value_shadow correctly (the
From<NoShadowOptions> impl can remain unchanged).

In `@crates/biome_css_semantic/src/semantic_model/builder.rs`:
- Around line 54-59: The match that treats selector-bearing parent rules as
non-selector parents is incomplete: update the matches on typed_node (the
AnyRuleStart pattern checks around the
CssMediaAtRule/CssScopeAtRule/CssSupportsAtRule cases) to also include the
container and starting-style variants (e.g., CssContainerAtRule and
CssStartingStyleAtRule or the project’s exact enum variant names for `@container`
and `@starting-style`), and make the same change in the second matching block
later (the similar match at the other location referenced in the review). This
ensures nested selectors inside `@container` and `@starting-style` are included in
the parent-selector skip set by adding those variants to the pattern lists.

In `@crates/biome_html_formatter/src/vue/lists/v_for_binding_list.rs`:
- Around line 7-18: The separator for FormatVueVForBindingList is currently a
hard space() which prevents line breaks for long destructuring bindings; replace
let separator = space() with a breakable separator such as
soft_line_break_or_space() (or the equivalent breakable spacer in
HtmlFormatContext's API), update any imports if necessary, and keep the rest of
the logic in FormatVueVForBindingList (node.format_separated(","),
join_with(&separator), joiner.entry(...), joiner.finish()) unchanged so the
joiner can break when the formatter width is exceeded.

In `@crates/biome_html_parser/src/lexer/mod.rs`:
- Around line 318-336: The function consume_token_vue_v_for_expression currently
treats EOF as a valid termination and returns HTML_LITERAL, which swallows the
rest of the file; change the EOF handling so that if the while loop exits
because current_byte() returned None (i.e., unterminated quoted v-for), you
return a distinct error token instead of HTML_LITERAL (for example
HtmlSyntaxKind::ERROR or a new HtmlSyntaxKind::VUE_UNTERMINATED_V_FOR_VALUE),
and do not continue consuming bytes; keep the existing early-return when a
closing quote is found (use consume_byte(quote) as before) and only produce the
error-kind on EOF to surface the unterminated-quote condition from
consume_token_vue_v_for_expression.
- Around line 1467-1473: HtmlReLexContext is missing the Vue v-for variants,
causing re-lexing to drift; add HtmlReLexContext::VueVForValue and
HtmlReLexContext::VueVForExpression(QuoteType) (match the payload used in
HtmlLexContext) to the HtmlReLexContext enum and update the re_lex() match arm
to handle these variants by delegating to the same helpers used in
next_token()β€”call consume_token_vue_v_for_value for VueVForValue and
consume_token_vue_v_for_expression(current, quote) for VueVForExpression so
incremental re-lexing behaves identically to next_token().

In `@crates/biome_html_parser/src/syntax/mod.rs`:
- Around line 628-633: The code currently switches the lexer to
HtmlLexContext::VueVForValue when consuming the '=' token in the
AttrInitializerContext::VueVFor branch (p.bump_with_context(T![=],
HtmlLexContext::VueVForValue)), which causes premature lexing in v-for context
and breaks recovery; change that call to use HtmlLexContext::AttributeValue
instead (so use p.bump_with_context(T![=], HtmlLexContext::AttributeValue)) and
let parse_vue_v_for_value() (which should call bump_v_for() when it sees the
opening quote) perform the context switch and parse the v-for value; keep the
rest of the branch (parse_vue_v_for_value().or_add_diagnostic(p,
expected_vue_v_for_value); return Present(m.complete(p,
HTML_ATTRIBUTE_INITIALIZER_CLAUSE));) unchanged.

In `@crates/biome_html_parser/src/syntax/vue.rs`:
- Around line 422-424: The tuple-binding closer in parse_vue_v_for_tuple_binding
currently uses p.eat(T![')']) which skips v-for context propagation; replace
that eat call with a context-aware call to bump_v_for (i.e., call
bump_v_for(...) for the ')' close) so the following token is lexed in v-for
context, and keep the existing error path (use
expected_vue_v_for_tuple_binding_end(p, p.cur_range()) on failure).

In `@crates/biome_js_analyze/src/frameworks/unit_tests.rs`:
- Around line 178-182: The current argument parsing in
crates/biome_js_analyze/src/frameworks/unit_tests.rs assumes the describe
callback is always at index 1 and thus misses the 3-argument form; change the
code that builds args for the describe call (the block using
call.arguments().ok()? and the destructure let [_, callback_arg] = ... ) to
fetch indices [0,1,2] and then pick the first argument that is a function-like
expression (e.g., check for the callback via as_any_js_expression or
is_function_like) so it handles describe(name, options, fn); apply the same fix
in use_playwright_valid_describe_callback.rs (the location around line 75) and
add snapshot tests covering describe(name, options, fn) in both the
useTestHooksOnTop and usePlaywrightValidDescribeCallback test specs.

In `@crates/biome_js_analyze/src/lint/suspicious/no_assign_in_expressions.rs`:
- Around line 75-79: The current early return on
file_source.is_svelte_const_block() mutes all JsAssignmentExpression checks
inside Svelte const blocks; instead, only skip the rule when the assignment node
is the top-level declaration-style assignment of that const block. Update the
logic in no_assign_in_expressions.rs to remove the blanket return and replace it
with a targeted check: when visiting a JsAssignmentExpression, detect if its AST
parent/ancestor is the Svelte const declaration node (i.e., the assignment is
the top-level initializer of the {`@const` ...} statement) and only then return
None; otherwise run the normal suspicious-assignment checks (keep detecting
nested assignments like {`@const` foo = (bar = baz)}). Use node.parent()/ancestors
and compare node span/range or parent node kind to identify the top-level
const-declaration case, keeping other JsAssignmentExpression cases unaffected.

In `@crates/biome_lsp/src/server.rs`:
- Around line 148-154: Add an end-to-end test that verifies the new
FileSystemWatcher pattern for ".biome.{json,jsonc}" actually triggers the server
reload flow: create a test that registers the watcher (matching
GlobPattern::Relative with RelativePattern pattern "**/.biome.{json,jsonc}"),
simulate a file change by sending a workspace/didChangeWatchedFiles notification
from the test client, then assert the server reloads settings and updates
diagnostics (i.e. observe the diagnostics response or updated config state)
rather than merely not crashing; use the existing test harness used by the
current watcher test as a template and ensure the test exercises the
didChangeWatchedFiles path and validates behavior of
ConfigName::file_names()-driven handling.

---

Outside diff comments:
In `@crates/biome_html_analyze/src/lint/a11y/no_access_key.rs`:
- Around line 99-103: The check in is_accesskey_attribute currently compares the
attribute name with the exact lowercase "accesskey", which fails for mixed-case
HTML attributes; update is_accesskey_attribute to perform a case-insensitive
comparison by retrieving the attribute name token (via
name().value_token().text_trimmed()) and comparing with "accesskey" using a
case-insensitive method (e.g., eq_ignore_ascii_case or to_ascii_lowercase() ==
"accesskey") so mixed-case forms like "accessKey" or "ACCESSKEY" are correctly
detected.

In `@crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs`:
- Around line 201-213: The branch that returns Some(State { backslash_index:
(index - 2) as u16, escaped: b'-', in_char_class: false }) is incorrectly
setting in_char_class to false, which prevents the char-class-specific
diagnostic note for '-' from appearing; update that return in the same
function/branch to set in_char_class: true so this edge case produces the same
character-class guidance as the existing `\\-` path (i.e., change the State
construction for the '-' case to use in_char_class: true).

In `@crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs`:
- Around line 240-255: The generic Vue directive pass currently reparses v-for
values as plain JS; inside the branch that checks
VueDirective::cast_ref(&element) and uses directive.initializer(), detect and
skip directives whose name_token() equals "v-for" (or whose directive kind
corresponds to VueVForValue) so you do NOT call
build_vue_directive_candidate(&initializer, is_v_on) for v-for; instead bypass
this block for v-for to avoid re-parsing the v-for pattern, and add a regression
snapshot test next to the new Svelte cases (under tests/specs/… for the relevant
rule/group) that includes a v-for with "item in items" and a destructuring
example to assert no false parse/undeclared-variable diagnostics.

---

Nitpick comments:
In `@crates/biome_js_analyze/src/frameworks/unit_tests.rs`:
- Around line 462-470: The helper first_describe_call duplicates first_call;
remove the duplicate by having callers use first_call (or by implementing
first_describe_call to delegate to first_call) and delete the redundant function
definition (update all references to first_describe_call to call first_call).
This keeps the test module DRY while retaining the same behavior; reference the
two helpers first_describe_call and first_call when making the change.

In `@GOVERNANCE.md`:
- Around line 159-160: The clause "The ability to merge PRs without approval, as
long as post-merge reviews are addressed in another PR" can be misread as
allowing merges that bypass mandatory checks; update this sentence to explicitly
state that required CI/status checks and branch protection rules still apply
even when prior approvals are skipped (e.g., append "provided all required
CI/status checks and branch protection rules are satisfied prior to merge");
locate and edit the sentence starting "The ability to merge PRs without
approval..." in GOVERNANCE.md and add the explicit reference to required checks
and branch protection so it's unambiguous.
πŸͺ„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ccdeb944-6385-4a31-b075-5c79cb38e1f6

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 9c7c6eb and 17a8746.

β›” Files ignored due to path filters (107)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • 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 **
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_configuration/src/generated/domain_selector.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_configuration/src/generated/linter_options_check.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_css_analyze/tests/specs/correctness/noUnknownFunction/valid.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/invalid.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/valid.css.snap is excluded by !**/*.snap and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_factory/src/generated/node_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_factory/src/generated/syntax_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/destructuring.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/expressions.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/iterable-expressions.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/quotes-and-of.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/simple.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/tuple.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/with-directives.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-destructuring.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-nested-destructuring.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-tuples.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/missing-parts.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/unterminated.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/svelte/each_with_method_call_key.svelte.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/dynamic-slot-arg.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-else-if.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for-single-quote-and-of.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/destructuring.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/expressions.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/iterable-expressions.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/nested-destructuring.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/quotes-and-of.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/simple.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/tuple.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/with-directives.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-html-text.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-mixed-complex.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_syntax/src/generated/kind.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/macros.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/nodes.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/nodes_mut.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/all/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/inputComponents/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/labelAttributes/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/labelComponents/valid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/a11y/useButtonType/valid/withBinding.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/complexity/noUselessStringConcat/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/issue9744.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noDrizzleDeleteWithoutWhere/valid/delete.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noDrizzleUpdateWithoutWhere/valid/update.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/20_invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-06.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-07.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-05.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-06.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-07.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-func-type-param.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-type-value-shadow.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryTemplateExpression/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/noUselessTypeConversion/valid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useDomNodeTextContent/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useNullishCoalescing/ignoreTernaryTestsEnabled.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useNullishCoalescing/ternaryCommentTrivia.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useReduceTypeParameter/valid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useUnicodeRegex/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useVarsOnTop/invalid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/nursery/useVarsOnTop/valid.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/performance/noDelete/valid.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/source/organizeImports/unorganized-bare-export-specifiers.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/noNegationElse/issue9629.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExportDefaultNamed.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExpression.ts.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid-svelte-const.svelte.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_parser/tests/js_test_suite/ok/unicode_codepoint_escape_surrogates.js.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/markdown/inline_italic.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-383.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-432.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-440.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/dist/index.d.ts is excluded by !**/dist/**, !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/dist/index.js is excluded by !**/dist/**, !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/package.json is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/source-main/package.json is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/source-main/src/index.ts is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/package.json is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/src/index.ts is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/types/index.d.ts is excluded by !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/untyped-main/dist/index.js is excluded by !**/dist/**, !**/node_modules/** and included by **
  • crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/untyped-main/package.json is excluded by !**/node_modules/** and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml and included by **
πŸ“’ Files selected for processing (153)
  • .changeset/add-use-test-hooks-on-top.md
  • .changeset/cyan-rooms-hunt.md
  • .changeset/fine-sites-fail.md
  • .changeset/fix-svelte-const-false-positive.md
  • .changeset/fix-svelte-each-key-parentheses.md
  • .changeset/gentle-bars-drop.md
  • .changeset/long-boxes-walk.md
  • .changeset/nine-lizards-sleep.md
  • .changeset/parse-vue-v-for-expressions.md
  • .changeset/red-cloths-bake.md
  • .changeset/smooth-pugs-brake.md
  • .changeset/tasty-experts-fail.md
  • .changeset/weak-kiwis-post.md
  • Cargo.toml
  • GOVERNANCE.md
  • benchmark/package.json
  • crates/biome_cli/src/execute/migrate/eslint_eslint.rs
  • crates/biome_cli/src/execute/migrate/eslint_to_biome.rs
  • crates/biome_cli/src/execute/migrate/eslint_typescript.rs
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonc
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonc
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonc
  • crates/biome_css_analyze/src/keywords.rs
  • crates/biome_css_analyze/src/lint/nursery/no_duplicate_selectors.rs
  • crates/biome_css_analyze/tests/specs/correctness/noUnknownFunction/valid.css
  • crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css
  • crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/invalid.css
  • crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/valid.css
  • crates/biome_css_semantic/src/events.rs
  • crates/biome_css_semantic/src/semantic_model/builder.rs
  • crates/biome_css_semantic/src/semantic_model/model.rs
  • crates/biome_formatter_test/src/prettier/package.json
  • crates/biome_html_analyze/src/a11y.rs
  • crates/biome_html_analyze/src/lint/a11y/no_access_key.rs
  • crates/biome_html_analyze/src/lint/a11y/no_redundant_alt.rs
  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/html/any/attribute_initializer.rs
  • crates/biome_html_formatter/src/shared.rs
  • crates/biome_html_formatter/src/vue/any/mod.rs
  • crates/biome_html_formatter/src/vue/any/v_for_binding.rs
  • crates/biome_html_formatter/src/vue/any/v_for_binding_list_element.rs
  • crates/biome_html_formatter/src/vue/any/v_for_destructured_binding.rs
  • crates/biome_html_formatter/src/vue/any/v_for_operator.rs
  • crates/biome_html_formatter/src/vue/auxiliary/mod.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_array_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_identifier_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_in_operator.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_object_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_object_property_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_of_operator.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_rest_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rs
  • crates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_element.rs
  • crates/biome_html_formatter/src/vue/lists/mod.rs
  • crates/biome_html_formatter/src/vue/lists/v_for_binding_list.rs
  • crates/biome_html_formatter/src/vue/mod.rs
  • crates/biome_html_formatter/src/vue/value/mod.rs
  • crates/biome_html_formatter/src/vue/value/v_for_value.rs
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/destructuring.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/expressions.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/iterable-expressions.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/quotes-and-of.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/simple.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/tuple.vue
  • crates/biome_html_formatter/tests/specs/html/vue/v-for/with-directives.vue
  • crates/biome_html_parser/src/lexer/mod.rs
  • crates/biome_html_parser/src/parser.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_html_parser/src/syntax/mod.rs
  • crates/biome_html_parser/src/syntax/parse_error.rs
  • crates/biome_html_parser/src/syntax/svelte.rs
  • crates/biome_html_parser/src/syntax/vue.rs
  • crates/biome_html_parser/src/token_source.rs
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-destructuring.vue
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-nested-destructuring.vue
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-tuples.vue
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/missing-parts.vue
  • crates/biome_html_parser/tests/html_specs/error/vue/v-for/unterminated.vue
  • crates/biome_html_parser/tests/html_specs/ok/svelte/each_with_method_call_key.svelte
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for-single-quote-and-of.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/destructuring.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/expressions.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/iterable-expressions.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/nested-destructuring.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/quotes-and-of.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/simple.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/tuple.vue
  • crates/biome_html_parser/tests/html_specs/ok/vue/v-for/with-directives.vue
  • crates/biome_html_syntax/src/attribute_ext.rs
  • crates/biome_html_syntax/src/element_ext.rs
  • crates/biome_js_analyze/src/frameworks/unit_tests.rs
  • crates/biome_js_analyze/src/lint/a11y/no_access_key.rs
  • crates/biome_js_analyze/src/lint/complexity/no_comma_operator.rs
  • crates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rs
  • crates/biome_js_analyze/src/lint/nursery/no_shadow.rs
  • crates/biome_js_analyze/src/lint/nursery/use_test_hooks_on_top.rs
  • crates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rs
  • crates/biome_js_analyze/src/lint/suspicious/no_assign_in_expressions.rs
  • crates/biome_js_analyze/src/services/semantic_class.rs
  • crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/invalid.js
  • crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/valid.js
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.options.json
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.options.json
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-05.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-06.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-07.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-func-type-param.ts
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-type-value-shadow.ts
  • crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/invalid.js
  • crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/valid.js
  • crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExportDefaultNamed.ts
  • crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExpression.ts
  • crates/biome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid-svelte-const.svelte
  • crates/biome_js_parser/src/lexer/mod.rs
  • crates/biome_js_parser/src/lexer/tests.rs
  • crates/biome_js_parser/tests/js_test_suite/ok/unicode_codepoint_escape_surrogates.js
  • crates/biome_js_parser/tests/spec_test.rs
  • crates/biome_js_syntax/src/file_source.rs
  • crates/biome_lsp/src/server.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/inline_italic.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/tests/specs/markdown/inline_italic.md
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-343.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-383.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-390.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-440.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier_ignored_tests
  • crates/biome_resolver/src/lib.rs
  • crates/biome_resolver/tests/spec_tests.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/no_shadow.rs
  • crates/biome_rule_options/src/use_test_hooks_on_top.rs
  • crates/biome_service/src/file_handlers/html/parse_embedded_nodes.rs
  • crates/biome_service/src/file_handlers/html/parse_embedded_nodes.tests.rs
  • crates/biome_service/src/file_handlers/svelte.rs
  • package.json
  • packages/@biomejs/backend-jsonrpc/package.json
  • packages/@biomejs/js-api/package.json
  • packages/aria-data/package.json
  • packages/prettier-compare/package.json
  • packages/tailwindcss-config-analyzer/package.json
  • xtask/codegen/html.ungram
  • xtask/codegen/src/generate_migrate_eslint.rs
  • xtask/codegen/src/generate_nodes.rs
  • xtask/codegen/src/generate_syntax_kinds.rs
  • xtask/codegen/src/html_kinds_src.rs
  • xtask/codegen/src/js_kinds_src.rs
πŸ’€ Files with no reviewable changes (8)
  • crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.ts
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-343.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-383.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-390.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.prettier-snap
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-440.md.prettier-snap

@@ -0,0 +1,5 @@
---
"@biomejs/biome": patch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

Use a minor changeset here.

This documents a new user-facing rule, so patch will undersell the release on next. Please bump @biomejs/biome to minor.

As per coding guidelines, "Use 'minor' change type for new features and non-breaking additions targeting the next branch."

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/add-use-test-hooks-on-top.md at line 2, Update the changeset
entry for the new user-facing rule by changing the release type from "patch" to
"minor" for the package identifier "@biomejs/biome": replace the value "patch"
with "minor" so the changeset correctly signals a minor release for the new
feature.

Comment on lines +1 to +3
---
"@biomejs/biome": patch
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

Use minor here rather than patch.

This is a non-breaking addition for next, so the release note should reflect that.

Suggested front-matter tweak
---
-"@biomejs/biome": patch
+"@biomejs/biome": minor
---

As per coding guidelines, Use 'minor' change type for new features and non-breaking additions targeting the next branch.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/nine-lizards-sleep.md around lines 1 - 3, Update the changeset
front-matter to use a minor release instead of patch: in the YAML block where
"@biomejs/biome" is set to "patch", change that value to "minor" so the
non-breaking addition to the next branch is released as a minor version.

Comment on lines +1 to +9
---
"@biomejs/biome": patch
---

Added two new options to [`noShadow`](https://biomejs.dev/linter/rules/no-shadow/), both defaulting to `true` to match typescript-eslint's behavior.

Fixed [#9482](https://github.com/biomejs/biome/issues/9482): Added `ignoreFunctionTypeParameterNameValueShadow` option. When enabled, parameter names inside function type annotations (e.g. `(options: unknown) => void`) are not flagged as shadowing outer variables.

Fixed [#7812](https://github.com/biomejs/biome/issues/7812): Added `ignoreTypeValueShadow` option. When enabled, a value binding that shares its name with a type-only declaration (type alias or interface) is not flagged, since types and values occupy separate namespaces in TypeScript.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

Switch this changeset to minor.

This adds user-facing options on the next branch, so patch misclassifies the release.

πŸ”§ Proposed fix
---
-"@biomejs/biome": patch
+"@biomejs/biome": minor
---

As per coding guidelines, use minor change type for new features and non-breaking additions targeting the next branch.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/tasty-experts-fail.md around lines 1 - 9, The changeset currently
marks the release as "patch" for the package entry '"@biomejs/biome": patch' but
adds new user-facing options (ignoreFunctionTypeParameterNameValueShadow and
ignoreTypeValueShadow), so update the changeset to use "minor" instead of
"patch" for the "@biomejs/biome" entry; locate the changeset file containing the
YAML header with '"@biomejs/biome": patch' and replace "patch" with "minor" so
the release type reflects a non-breaking feature addition.

Comment on lines +656 to +670
#[derive(Debug, Default, Deserializable)]
#[deserializable(unknown_fields = "allow")]
pub(crate) struct NoShadowOptions {
ignore_type_value_shadow: Option<bool>,
ignore_function_type_parameter_name_value_shadow: Option<bool>,
}
impl From<NoShadowOptions> for no_shadow::NoShadowOptions {
fn from(val: NoShadowOptions) -> Self {
Self {
ignore_type_value_shadow: val.ignore_type_value_shadow,
ignore_function_type_parameter_name_value_shadow: val
.ignore_function_type_parameter_name_value_shadow,
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether the migrate-eslint fixtures use camelCase keys and whether this struct maps them explicitly.
rg -n -C 2 -e 'ignoreTypeValueShadow|ignoreFunctionTypeParameterNameValueShadow|ignore_type_value_shadow|ignore_function_type_parameter_name_value_shadow|deserializable\(rename' \
  crates/biome_cli/src/execute/migrate/eslint_typescript.rs \
  crates/biome_cli/tests/specs/migrate_eslint

Repository: biomejs/biome

Length of output: 7192


Add explicit rename mappings for deserialisation.

The struct lacks #[deserializable(rename = "...")] attributes. Your test fixtures show the input uses camelCase (ignoreTypeValueShadow, ignoreFunctionTypeParameterNameValueShadow), but the Rust fields are snake_case. Without the renames, both options silently become None and user settings vanish during the migration.

πŸ”§ Fix
 pub(crate) struct NoShadowOptions {
+    #[deserializable(rename = "ignoreTypeValueShadow")]
     ignore_type_value_shadow: Option<bool>,
+    #[deserializable(rename = "ignoreFunctionTypeParameterNameValueShadow")]
     ignore_function_type_parameter_name_value_shadow: Option<bool>,
 }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately 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.

Suggested change
#[derive(Debug, Default, Deserializable)]
#[deserializable(unknown_fields = "allow")]
pub(crate) struct NoShadowOptions {
ignore_type_value_shadow: Option<bool>,
ignore_function_type_parameter_name_value_shadow: Option<bool>,
}
impl From<NoShadowOptions> for no_shadow::NoShadowOptions {
fn from(val: NoShadowOptions) -> Self {
Self {
ignore_type_value_shadow: val.ignore_type_value_shadow,
ignore_function_type_parameter_name_value_shadow: val
.ignore_function_type_parameter_name_value_shadow,
}
}
}
#[derive(Debug, Default, Deserializable)]
#[deserializable(unknown_fields = "allow")]
pub(crate) struct NoShadowOptions {
#[deserializable(rename = "ignoreTypeValueShadow")]
ignore_type_value_shadow: Option<bool>,
#[deserializable(rename = "ignoreFunctionTypeParameterNameValueShadow")]
ignore_function_type_parameter_name_value_shadow: Option<bool>,
}
impl From<NoShadowOptions> for no_shadow::NoShadowOptions {
fn from(val: NoShadowOptions) -> Self {
Self {
ignore_type_value_shadow: val.ignore_type_value_shadow,
ignore_function_type_parameter_name_value_shadow: val
.ignore_function_type_parameter_name_value_shadow,
}
}
}
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_cli/src/execute/migrate/eslint_typescript.rs` around lines 656 -
670, The NoShadowOptions struct is missing deserialization rename mappings so
camelCase JSON keys are not mapped to the snake_case Rust fields; update the
struct (NoShadowOptions) to annotate each field with #[deserializable(rename =
"ignoreTypeValueShadow")] and #[deserializable(rename =
"ignoreFunctionTypeParameterNameValueShadow")] respectively so deserialization
populates ignore_type_value_shadow and
ignore_function_type_parameter_name_value_shadow correctly (the
From<NoShadowOptions> impl can remain unchanged).

Comment on lines 54 to 59
if matches!(
typed_node,
AnyRuleStart::CssMediaAtRule(_) | AnyRuleStart::CssSupportsAtRule(_)
AnyRuleStart::CssMediaAtRule(_)
| AnyRuleStart::CssScopeAtRule(_)
| AnyRuleStart::CssSupportsAtRule(_)
) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Complete the parent-selector skip set.

@scope is handled now, but @container and @starting-style still fall through as selector-bearing parents here. Nested selectors inside those blocks will still resolve against an empty parent selector list.

Suggested fix
                     if matches!(
                         typed_node,
                         AnyRuleStart::CssMediaAtRule(_)
+                            | AnyRuleStart::CssContainerAtRule(_)
                             | AnyRuleStart::CssScopeAtRule(_)
+                            | AnyRuleStart::CssStartingStyleAtRule(_)
                             | AnyRuleStart::CssSupportsAtRule(_)
                     ) {

Also applies to: 89-94

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_css_semantic/src/semantic_model/builder.rs` around lines 54 -
59, The match that treats selector-bearing parent rules as non-selector parents
is incomplete: update the matches on typed_node (the AnyRuleStart pattern checks
around the CssMediaAtRule/CssScopeAtRule/CssSupportsAtRule cases) to also
include the container and starting-style variants (e.g., CssContainerAtRule and
CssStartingStyleAtRule or the project’s exact enum variant names for `@container`
and `@starting-style`), and make the same change in the second matching block
later (the similar match at the other location referenced in the review). This
ensures nested selectors inside `@container` and `@starting-style` are included in
the parent-selector skip set by adding those variants to the pattern lists.

Comment on lines +628 to +633
// For v-for, we need to switch to VueVForValue context immediately
// and parse the v-for value directly (not as an HtmlString first)
if context == AttrInitializerContext::VueVFor {
p.bump_with_context(T![=], HtmlLexContext::VueVForValue);
parse_vue_v_for_value(p).or_add_diagnostic(p, expected_vue_v_for_value);
return Present(m.complete(p, HTML_ATTRIBUTE_INITIALIZER_CLAUSE));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Show where the lexer switches into VueVForValue and how the opening quote is consumed.
sed -n '619,636p' crates/biome_html_parser/src/syntax/mod.rs
printf '\n--- parse_vue_v_for_value entry ---\n'
sed -n '277,289p' crates/biome_html_parser/src/syntax/vue.rs
printf '\n--- VueVForValue call sites ---\n'
rg -n "VueVForValue|bump_v_for\(start_quote_kind\)" crates/biome_html_parser/src/syntax/mod.rs crates/biome_html_parser/src/syntax/vue.rs

Repository: biomejs/biome

Length of output: 1640


Switch to VueVForValue context only when encountering the opening quote, not the = token.

Switching lexer context on = means malformed input like v-for=item in items class="x" gets lexed in v-for context before parse_vue_v_for_value() can return Absent, degrading error recovery. Use HtmlLexContext::AttributeValue for the = and let parse_vue_v_for_value() handle context switching when it finds the opening quote via bump_v_for().

Suggested fix
     if context == AttrInitializerContext::VueVFor {
-        p.bump_with_context(T![=], HtmlLexContext::VueVForValue);
+        p.bump_with_context(T![=], HtmlLexContext::AttributeValue);
         parse_vue_v_for_value(p).or_add_diagnostic(p, expected_vue_v_for_value);
         return Present(m.complete(p, HTML_ATTRIBUTE_INITIALIZER_CLAUSE));
     }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately 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.

Suggested change
// For v-for, we need to switch to VueVForValue context immediately
// and parse the v-for value directly (not as an HtmlString first)
if context == AttrInitializerContext::VueVFor {
p.bump_with_context(T![=], HtmlLexContext::VueVForValue);
parse_vue_v_for_value(p).or_add_diagnostic(p, expected_vue_v_for_value);
return Present(m.complete(p, HTML_ATTRIBUTE_INITIALIZER_CLAUSE));
// For v-for, we need to switch to VueVForValue context immediately
// and parse the v-for value directly (not as an HtmlString first)
if context == AttrInitializerContext::VueVFor {
p.bump_with_context(T![=], HtmlLexContext::AttributeValue);
parse_vue_v_for_value(p).or_add_diagnostic(p, expected_vue_v_for_value);
return Present(m.complete(p, HTML_ATTRIBUTE_INITIALIZER_CLAUSE));
}
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_html_parser/src/syntax/mod.rs` around lines 628 - 633, The code
currently switches the lexer to HtmlLexContext::VueVForValue when consuming the
'=' token in the AttrInitializerContext::VueVFor branch
(p.bump_with_context(T![=], HtmlLexContext::VueVForValue)), which causes
premature lexing in v-for context and breaks recovery; change that call to use
HtmlLexContext::AttributeValue instead (so use p.bump_with_context(T![=],
HtmlLexContext::AttributeValue)) and let parse_vue_v_for_value() (which should
call bump_v_for() when it sees the opening quote) perform the context switch and
parse the v-for value; keep the rest of the branch
(parse_vue_v_for_value().or_add_diagnostic(p, expected_vue_v_for_value); return
Present(m.complete(p, HTML_ATTRIBUTE_INITIALIZER_CLAUSE));) unchanged.

Comment on lines +422 to +424
if !p.eat(T![')']) {
p.error(expected_vue_v_for_tuple_binding_end(p, p.cur_range()));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect how v-for delimiters are consumed and compare tuple/object/array closers.
sed -n '374,430p' crates/biome_html_parser/src/syntax/vue.rs
printf '\n--- helper usage ---\n'
rg -n "bump_v_for|expect_v_for|eat\(T!\['\)'\]\)" crates/biome_html_parser/src/syntax/vue.rs

Repository: biomejs/biome

Length of output: 2058


Use bump_v_for() to close the tuple binding with proper context.

The tuple binding closer at line 422 is the only delimiter in the v-for parsers that doesn't use a context-aware helper. Both parse_vue_v_for_object_binding and parse_vue_v_for_array_binding use expect_v_for() for their closers, ensuring the following token (in / of) is lexed in the v-for context. Using p.eat(T![')']) here skips that context propagation.

Suggested fix
-    if !p.eat(T![')']) {
+    if p.at(T![')']) {
+        p.bump_v_for(T![')']);
+    } else {
         p.error(expected_vue_v_for_tuple_binding_end(p, p.cur_range()));
     }
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately 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.

Suggested change
if !p.eat(T![')']) {
p.error(expected_vue_v_for_tuple_binding_end(p, p.cur_range()));
}
if p.at(T![')']) {
p.bump_v_for(T![')']);
} else {
p.error(expected_vue_v_for_tuple_binding_end(p, p.cur_range()));
}
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_html_parser/src/syntax/vue.rs` around lines 422 - 424, The
tuple-binding closer in parse_vue_v_for_tuple_binding currently uses
p.eat(T![')']) which skips v-for context propagation; replace that eat call with
a context-aware call to bump_v_for (i.e., call bump_v_for(...) for the ')'
close) so the following token is lexed in v-for context, and keep the existing
error path (use expected_vue_v_for_tuple_binding_end(p, p.cur_range()) on
failure).

Comment on lines +178 to +182
let args = call.arguments().ok()?;
let [_, callback_arg] = args.get_arguments_by_index([0, 1]);
let callback_arg = callback_arg?;
let expr = callback_arg.as_any_js_expression()?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Node.js node:test docs: what is the exact describe signature, and can the callback be the third parameter (describe(name[, options][, fn]))?

πŸ’‘ Result:

Exact describe signature in Node.js node:test is describe([name][, options][, fn]). It is an alias for suite. Callback parameter position: yes, the callback/suite function can be the third parameter, i.e. you can call describe(name[, options][, fn]). The fn argument is the suite function that declares nested tests/suites; its first argument is a SuiteContext object. Note: the node:test documentation describes fn as a synchronous function (in the canary docs). Separately, there is a known issue where an async callback passed to describe is not awaited, causing the parent to finish early.

Citations:


🏁 Script executed:

# First, check if the file exists and read the relevant lines
wc -l crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 114


🏁 Script executed:

# Read lines around 178-182
sed -n '170,190p' crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 802


🏁 Script executed:

# Search for the describe_body function to understand context
rg -n "fn describe_body" crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 421


🏁 Script executed:

# Search for tests related to describe with options
fd -e rs crates/biome_js_analyze/tests && find crates/biome_js_analyze/tests -name "*.rs" -o -name "*.snap" | head -20

Repository: biomejs/biome

Length of output: 479


🏁 Script executed:

# Check if there are snapshot tests for unit test rules
find crates/biome_js_analyze/tests -type d -name "*describe*" -o -type d -name "*unit*test*"

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Read the existing test cases for describe_body
sed -n '473,520p' crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 1673


🏁 Script executed:

# Check if there's any test or code related to options parameter
rg -n "options" crates/biome_js_analyze/src/frameworks/unit_tests.rs | head -20

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Look for any TODOs or FIXMEs related to this function
rg -B5 -A5 "get_arguments_by_index.*0.*1" crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 423


🏁 Script executed:

# Check the full describe_body function implementation
sed -n '173,205p' crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 1047


🏁 Script executed:

# Find all rules/functions that use describe_body
rg -n "describe_body" crates/biome_js_analyze/src/frameworks/unit_tests.rs

Repository: biomejs/biome

Length of output: 853


🏁 Script executed:

# Check the get_arguments_by_index method signature/docs
rg -B3 -A8 "fn get_arguments_by_index" crates/biome_js_analyze

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Look for other usage patterns to understand the API better
rg "get_arguments_by_index" crates/biome_js_analyze/src/ -A1 | head -30

Repository: biomejs/biome

Length of output: 2510


🏁 Script executed:

# Find all rules that call describe_body
rg "describe_body\(" crates/biome_js_analyze/src/lint -B2 -A2

Repository: biomejs/biome

Length of output: 557


🏁 Script executed:

# Check the return type of get_arguments_by_index to understand if [0, 1, 2] works
rg -B5 -A15 "fn get_arguments_by_index" crates/biome_js_syntax

Repository: biomejs/biome

Length of output: 1831


🏁 Script executed:

# Search for Playwright-related rules that might use describe
fd -e rs crates/biome_js_analyze/src/lint/nursery | xargs grep -l "describe"

Repository: biomejs/biome

Length of output: 525


🏁 Script executed:

# Check the use_test_hooks_on_top rule to understand what it does
cat -n crates/biome_js_analyze/src/lint/nursery/use_test_hooks_on_top.rs | head -100

Repository: biomejs/biome

Length of output: 4288


🏁 Script executed:

# Look for the describe validation rule in Playwright
cat -n crates/biome_js_analyze/src/lint/nursery/use_playwright_valid_describe_callback.rs | head -80

Repository: biomejs/biome

Length of output: 3248


🏁 Script executed:

# Check if use_playwright_valid_describe_callback also needs fixing
sed -n '70,85p' crates/biome_js_analyze/src/lint/nursery/use_playwright_valid_describe_callback.rs

Repository: biomejs/biome

Length of output: 603


🏁 Script executed:

# Check if there's already a test spec directory for these rules
find crates/biome_js_analyze/tests -type d -name "specs"

Repository: biomejs/biome

Length of output: 93


🏁 Script executed:

# Check test structure for these rules
find crates/biome_js_analyze/tests/specs -type d | grep -E "(test_hooks|playwright)" | head -10

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Look at an example test directory structure
ls -la crates/biome_js_analyze/tests/specs/nursery/ 2>/dev/null | head -20

Repository: biomejs/biome

Length of output: 1402


🏁 Script executed:

# Check for useTestHooksOnTop test directory
ls -la crates/biome_js_analyze/tests/specs/nursery/ | grep -i "hook"

Repository: biomejs/biome

Length of output: 202


🏁 Script executed:

# Check for test structure with a known rule
ls -la crates/biome_js_analyze/tests/specs/nursery/noIdenticalTestTitle/

Repository: biomejs/biome

Length of output: 427


🏁 Script executed:

# Look at existing test structure
cat crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/invalid.js

Repository: biomejs/biome

Length of output: 1230


🏁 Script executed:

# Verify the exact line in use_playwright_valid_describe_callback.rs to confirm it has the same issue
sed -n '73,80p' crates/biome_js_analyze/src/lint/nursery/use_playwright_valid_describe_callback.rs

Repository: biomejs/biome

Length of output: 424


Handle describe(name, options, fn) callback placement correctly.

The code assumes the callback is always the second argument, but Node.js node:test allows describe([name][, options][, fn]). When options are passed, the callback lands at index 2 instead, causing the function to silently return None for valid test suites.

The same issue exists in use_playwright_valid_describe_callback.rs (line 75).

Fix both locations by retrieving indices [0, 1, 2] and finding the first function-like expression, as suggested. Include snapshot tests for the 3-argument case in both useTestHooksOnTop and usePlaywrightValidDescribeCallback test specs.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/frameworks/unit_tests.rs` around lines 178 - 182,
The current argument parsing in
crates/biome_js_analyze/src/frameworks/unit_tests.rs assumes the describe
callback is always at index 1 and thus misses the 3-argument form; change the
code that builds args for the describe call (the block using
call.arguments().ok()? and the destructure let [_, callback_arg] = ... ) to
fetch indices [0,1,2] and then pick the first argument that is a function-like
expression (e.g., check for the callback via as_any_js_expression or
is_function_like) so it handles describe(name, options, fn); apply the same fix
in use_playwright_valid_describe_callback.rs (the location around line 75) and
add snapshot tests covering describe(name, options, fn) in both the
useTestHooksOnTop and usePlaywrightValidDescribeCallback test specs.

Comment on lines +75 to +79
// Skip assignments in Svelte const blocks ({@const name = value})
// These are declaration statements, not accidental assignments in expressions
if file_source.is_svelte_const_block() {
return None;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don’t mute the whole rule for Svelte const blocks.

This also suppresses genuinely suspicious nested assignments inside the initializer. For example, {@const foo = (bar = baz)} would now let bar = baz slip through. Please only exempt the top-level declaration-style assignment, not every JsAssignmentExpression in that embedded snippet.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_js_analyze/src/lint/suspicious/no_assign_in_expressions.rs`
around lines 75 - 79, The current early return on
file_source.is_svelte_const_block() mutes all JsAssignmentExpression checks
inside Svelte const blocks; instead, only skip the rule when the assignment node
is the top-level declaration-style assignment of that const block. Update the
logic in no_assign_in_expressions.rs to remove the blanket return and replace it
with a targeted check: when visiting a JsAssignmentExpression, detect if its AST
parent/ancestor is the Svelte const declaration node (i.e., the assignment is
the top-level initializer of the {`@const` ...} statement) and only then return
None; otherwise run the normal suspicious-assignment checks (keep detecting
nested assignments like {`@const` foo = (bar = baz)}). Use node.parent()/ancestors
and compare node span/range or parent node kind to identify the top-level
const-declaration case, keeping other JsAssignmentExpression cases unaffected.

Comment on lines +148 to +154
FileSystemWatcher {
glob_pattern: GlobPattern::Relative(RelativePattern {
pattern: "**/.biome.{json,jsonc}".to_string(),
base_uri: OneOf::Left(folder.clone()),
}),
kind: Some(WatchKind::all()),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in crates/biome_lsp/src/server.tests.rs crates/biome_service/src/workspace/watcher.tests.rs; do
  if [ -f "$f" ]; then
    echo "== $f =="
    rg -n -C 3 '\.biome|did_change_watched_files|didChangeWatchedFiles|log_message|load_workspace_settings|update_all_diagnostics' "$f"
  fi
done

Repository: biomejs/biome

Length of output: 11181


🏁 Script executed:

#!/bin/bash
# View the actual changes at the specified lines
echo "=== Lines 148-154 ===" 
sed -n '145,160p' crates/biome_lsp/src/server.rs | cat -n

echo -e "\n=== Lines 200-203 ==="
sed -n '198,210p' crates/biome_lsp/src/server.rs | cat -n

echo -e "\n=== Lines 418-431 ==="
sed -n '415,435p' crates/biome_lsp/src/server.rs | cat -n

Repository: biomejs/biome

Length of output: 3159


🏁 Script executed:

#!/bin/bash
# Search for .biome.json or .biome.jsonc in test files
echo "=== Searching for .biome file watching tests ==="
rg -n '\.biome\.(json|jsonc)|biome\.json' crates/biome_lsp/src/server.tests.rs

echo -e "\n=== Checking workspace watcher tests ==="
if [ -f crates/biome_service/src/workspace/watcher.tests.rs ]; then
  rg -n '\.biome\.(json|jsonc)|biome\.json|config_file' crates/biome_service/src/workspace/watcher.tests.rs | head -20
fi

Repository: biomejs/biome

Length of output: 2633


🏁 Script executed:

#!/bin/bash
# Check if watcher.tests.rs exists and search for watched file tests
echo "=== Checking for watcher tests file ==="
find . -name "watcher.tests.rs" -o -name "watcher*test*.rs" 2>/dev/null | head -20

echo -e "\n=== Search for didChangeWatchedFiles tests ==="
rg -n 'didChangeWatchedFiles|did_change_watched_files' crates/biome_lsp/src/server.tests.rs -A 10 | head -40

echo -e "\n=== Search for .biome pattern in server.rs (all occurrences) ==="
rg -n '\.biome\.' crates/biome_lsp/src/server.rs

Repository: biomejs/biome

Length of output: 1540


🏁 Script executed:

#!/bin/bash
# Check what the condition at lines 418-431 is checking for
echo "=== Checking the full watched file condition at lines 410-435 ==="
sed -n '410,435p' crates/biome_lsp/src/server.rs | cat -n

Repository: biomejs/biome

Length of output: 1592


🏁 Script executed:

#!/bin/bash
# Find ConfigName and see what file_names it returns
echo "=== Searching for ConfigName definition ==="
rg -n 'impl.*ConfigName|fn file_names' crates/biome_service/src/workspace/configuration.rs -A 5 | head -40

echo -e "\n=== Direct search for ConfigName file_names ==="
rg -n 'biome\.json|biome\.jsonc' crates/biome_service/src/workspace/configuration.rs

Repository: biomejs/biome

Length of output: 352


🏁 Script executed:

#!/bin/bash
# Check if there's a test that actually simulates didChangeWatchedFiles with .biome files
echo "=== Looking for tests that simulate watched file changes with notification ==="
rg -n 'didChangeWatchedFiles|DidChangeWatchedFiles' crates/biome_lsp/src/server.tests.rs -B 3 -A 15

Repository: biomejs/biome

Length of output: 1897


🏁 Script executed:

#!/bin/bash
# Find ConfigName more broadly
echo "=== Searching for ConfigName definition ==="
rg -n 'enum ConfigName|struct ConfigName' crates/ --type rust -A 10 | head -50

echo -e "\n=== Searching for file_names method ==="
rg -n 'fn file_names|pub.*file_names' crates/ --type rust -A 3 | head -30

Repository: biomejs/biome

Length of output: 950


🏁 Script executed:

#!/bin/bash
# Check if .biome is explicitly handled in the watched file condition
echo "=== Full watched file condition context (lines 405-435) ==="
sed -n '405,435p' crates/biome_lsp/src/server.rs | cat -n

echo -e "\n=== Check ConfigName references in server.rs ==="
rg -n 'ConfigName' crates/biome_lsp/src/server.rs -B 2 -A 2

Repository: biomejs/biome

Length of output: 2488


Add end-to-end test for .biome.{json,jsonc} file change notifications.

The watcher registration and handler code are correct β€” ConfigName::file_names() already includes the new .biome.{json,jsonc} patterns. However, there's no LSP test that exercises the complete flow: watcher fires β†’ client sends didChangeWatchedFiles notification β†’ server reloads settings and diagnostics. The existing test at line 5823 only verifies the server doesn't crash; it doesn't test actual file change handling. Per the guidelines, this should include a test that reproduces the notification flow.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_lsp/src/server.rs` around lines 148 - 154, Add an end-to-end
test that verifies the new FileSystemWatcher pattern for ".biome.{json,jsonc}"
actually triggers the server reload flow: create a test that registers the
watcher (matching GlobPattern::Relative with RelativePattern pattern
"**/.biome.{json,jsonc}"), simulate a file change by sending a
workspace/didChangeWatchedFiles notification from the test client, then assert
the server reloads settings and updates diagnostics (i.e. observe the
diagnostics response or updated config state) rather than merely not crashing;
use the existing test harness used by the current watcher test as a template and
ensure the test exercises the didChangeWatchedFiles path and validates behavior
of ConfigName::file_names()-driven handling.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs (1)

285-292: ⚠️ Potential issue | 🟑 Minor

Add a Vue v-for regression fixture to test this path.

The change to has_label_attribute_value now handles VueVForValue via the _ => false catch-all. Existing Vue test fixtures for noLabelWithoutControl do not cover v-for directives, leaving this code path unexercised. Add a snapshot fixture with v-for usage to lock in the behaviourβ€”for example, an input with v-for="item in items" where the label attribute uses a dynamic expression.

πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs` around
lines 285 - 292, Add a Vue v-for regression fixture to exercise the new
has_label_attribute_value code path: create a snapshot test that uses the
noLabelWithoutControl rule and includes a label/input pair where the label has a
dynamic attribute value inside a v-for (e.g., v-for="item in items" and
:for="`id-${item.id}`" or v-bind on the label). Ensure the fixture lives
alongside existing noLabelWithoutControl Vue fixtures and asserts the current
behavior (no crash and the expected diagnostics), so the
AnyHtmlAttributeInitializer branch for VueVForValue is covered by tests and
future regressions are caught.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs`:
- Around line 285-292: Add a Vue v-for regression fixture to exercise the new
has_label_attribute_value code path: create a snapshot test that uses the
noLabelWithoutControl rule and includes a label/input pair where the label has a
dynamic attribute value inside a v-for (e.g., v-for="item in items" and
:for="`id-${item.id}`" or v-bind on the label). Ensure the fixture lives
alongside existing noLabelWithoutControl Vue fixtures and asserts the current
behavior (no crash and the expected diagnostics), so the
AnyHtmlAttributeInitializer branch for VueVForValue is covered by tests and
future regressions are caught.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f229b390-e024-47fc-9cea-3273b336c1fc

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 17a8746 and 773418b.

β›” Files ignored due to path filters (3)
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonc.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonc.snap is excluded by !**/*.snap and included by **
πŸ“’ Files selected for processing (1)
  • crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs

@Netail
Netail requested review from a team April 27, 2026 21:49

@ematipico ematipico left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't recall why it was suggested, but technically in these merge PRs we don't to use the merge commit strategy. We're good with squashing

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-Formatter Area: formatter A-Linter Area: linter A-LSP Area: language server protocol A-Parser Area: parser A-Project Area: project A-Resolver Area: resolver A-Tooling Area: internal tools L-CSS Language: CSS and super languages L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages L-Markdown Language: Markdown

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants