Repository navigation
chore: main into next - #10142
chore: main into next#10142
Conversation
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>
β¦ 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 detectedLatest commit: 773418b The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
4f4aea1 to
773418b
Compare
WalkthroughAdds a large set of changes across linting, parsing, formatting, resolver and tooling metadata. Notable facts: introduces nursery lint Possibly related PRs
Suggested reviewers
π₯ Pre-merge checks | β 4β Passed checks (4 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 | π‘ MinorPreserve the char-class note on this path.
This branch now reports the
-case, butin_char_class: falseskips the character-class-specific diagnostic note for-. Set it totrueso 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 | π MajorUse case-insensitive matching for HTML attribute names.
accessKeyis 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 | π MajorSkip
v-forin the generic Vue directive pass.Nice catch adding
VueVForValue, but this branch still reparses the wholev-forvalue as plain JS. For forms likeitem in itemsor destructuring aliases, that can reintroduce false parse/undeclared-variable diagnostics even though the iterable expression is now handled separately. Please special-casev-forhere 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_callis identical tofirst_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
β Files ignored due to path filters (107)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rsis excluded by!**/migrate/eslint_any_rule_to_biome.rsand included by**crates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_configuration/src/generated/domain_selector.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_configuration/src/generated/linter_options_check.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_css_analyze/tests/specs/correctness/noUnknownFunction/valid.css.snapis excluded by!**/*.snapand included by**crates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.css.snapis excluded by!**/*.snapand included by**crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/invalid.css.snapis excluded by!**/*.snapand included by**crates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/valid.css.snapis excluded by!**/*.snapand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_factory/src/generated/node_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_factory/src/generated/syntax_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/destructuring.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/expressions.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/iterable-expressions.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/quotes-and-of.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/simple.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/tuple.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_formatter/tests/specs/html/vue/v-for/with-directives.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-destructuring.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-nested-destructuring.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-tuples.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/vue/v-for/missing-parts.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/vue/v-for/unterminated.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/svelte/each_with_method_call_key.svelte.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/dynamic-slot-arg.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-else-if.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for-single-quote-and-of.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/destructuring.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/expressions.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/iterable-expressions.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/nested-destructuring.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/quotes-and-of.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/simple.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/tuple.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-for/with-directives.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-html-text.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/vue/v-mixed-complex.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_syntax/src/generated/kind.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/macros.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/nodes.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/nodes_mut.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/all/valid.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/inputComponents/valid.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/labelAttributes/valid.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/a11y/noLabelWithoutControl/labelComponents/valid.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/a11y/useButtonType/valid/withBinding.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/noUselessStringConcat/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/issue9744.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noDrizzleDeleteWithoutWhere/valid/delete.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noDrizzleUpdateWithoutWhere/valid/update.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/20_invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-06.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-07.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-05.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-06.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-07.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-func-type-param.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noShadow/valid-type-value-shadow.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noUnnecessaryTemplateExpression/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noUselessTypeConversion/valid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useDomNodeTextContent/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useNullishCoalescing/ignoreTernaryTestsEnabled.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useNullishCoalescing/ternaryCommentTrivia.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useReduceTypeParameter/valid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useUnicodeRegex/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useVarsOnTop/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useVarsOnTop/valid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/performance/noDelete/valid.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/source/organizeImports/unorganized-bare-export-specifiers.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/noNegationElse/issue9629.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExportDefaultNamed.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExpression.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid-svelte-const.svelte.snapis excluded by!**/*.snapand included by**crates/biome_js_parser/tests/js_test_suite/ok/unicode_codepoint_escape_surrogates.js.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/markdown/inline_italic.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-383.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-432.md.snapis excluded by!**/*.snapand included by**crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-440.md.snapis excluded by!**/*.snapand included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/dist/index.d.tsis excluded by!**/dist/**,!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/dist/index.jsis excluded by!**/dist/**,!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/runtime-main/package.jsonis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/source-main/package.jsonis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/source-main/src/index.tsis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/package.jsonis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/src/index.tsis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/types-and-main/types/index.d.tsis excluded by!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/untyped-main/dist/index.jsis excluded by!**/dist/**,!**/node_modules/**and included by**crates/biome_resolver/tests/fixtures/resolver_cases_5/node_modules/untyped-main/package.jsonis excluded by!**/node_modules/**and included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**pnpm-lock.yamlis excluded by!**/pnpm-lock.yamland 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.mdCargo.tomlGOVERNANCE.mdbenchmark/package.jsoncrates/biome_cli/src/execute/migrate/eslint_eslint.rscrates/biome_cli/src/execute/migrate/eslint_to_biome.rscrates/biome_cli/src/execute/migrate/eslint_typescript.rscrates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonccrates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonccrates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonccrates/biome_css_analyze/src/keywords.rscrates/biome_css_analyze/src/lint/nursery/no_duplicate_selectors.rscrates/biome_css_analyze/tests/specs/correctness/noUnknownFunction/valid.csscrates/biome_css_analyze/tests/specs/correctness/noUnknownProperty/valid.csscrates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/invalid.csscrates/biome_css_analyze/tests/specs/nursery/noDuplicateSelectors/valid.csscrates/biome_css_semantic/src/events.rscrates/biome_css_semantic/src/semantic_model/builder.rscrates/biome_css_semantic/src/semantic_model/model.rscrates/biome_formatter_test/src/prettier/package.jsoncrates/biome_html_analyze/src/a11y.rscrates/biome_html_analyze/src/lint/a11y/no_access_key.rscrates/biome_html_analyze/src/lint/a11y/no_redundant_alt.rscrates/biome_html_formatter/src/generated.rscrates/biome_html_formatter/src/html/any/attribute_initializer.rscrates/biome_html_formatter/src/shared.rscrates/biome_html_formatter/src/vue/any/mod.rscrates/biome_html_formatter/src/vue/any/v_for_binding.rscrates/biome_html_formatter/src/vue/any/v_for_binding_list_element.rscrates/biome_html_formatter/src/vue/any/v_for_destructured_binding.rscrates/biome_html_formatter/src/vue/any/v_for_operator.rscrates/biome_html_formatter/src/vue/auxiliary/mod.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_array_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_identifier_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_in_operator.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_object_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_object_property_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_of_operator.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_rest_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_binding.rscrates/biome_html_formatter/src/vue/auxiliary/v_for_tuple_element.rscrates/biome_html_formatter/src/vue/lists/mod.rscrates/biome_html_formatter/src/vue/lists/v_for_binding_list.rscrates/biome_html_formatter/src/vue/mod.rscrates/biome_html_formatter/src/vue/value/mod.rscrates/biome_html_formatter/src/vue/value/v_for_value.rscrates/biome_html_formatter/tests/specs/html/vue/v-for/destructuring.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/expressions.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/iterable-expressions.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/quotes-and-of.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/simple.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/tuple.vuecrates/biome_html_formatter/tests/specs/html/vue/v-for/with-directives.vuecrates/biome_html_parser/src/lexer/mod.rscrates/biome_html_parser/src/parser.rscrates/biome_html_parser/src/syntax/astro.rscrates/biome_html_parser/src/syntax/mod.rscrates/biome_html_parser/src/syntax/parse_error.rscrates/biome_html_parser/src/syntax/svelte.rscrates/biome_html_parser/src/syntax/vue.rscrates/biome_html_parser/src/token_source.rscrates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-destructuring.vuecrates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-nested-destructuring.vuecrates/biome_html_parser/tests/html_specs/error/vue/v-for/invalid-tuples.vuecrates/biome_html_parser/tests/html_specs/error/vue/v-for/missing-parts.vuecrates/biome_html_parser/tests/html_specs/error/vue/v-for/unterminated.vuecrates/biome_html_parser/tests/html_specs/ok/svelte/each_with_method_call_key.sveltecrates/biome_html_parser/tests/html_specs/ok/vue/v-for-single-quote-and-of.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/destructuring.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/expressions.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/iterable-expressions.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/nested-destructuring.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/quotes-and-of.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/simple.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/tuple.vuecrates/biome_html_parser/tests/html_specs/ok/vue/v-for/with-directives.vuecrates/biome_html_syntax/src/attribute_ext.rscrates/biome_html_syntax/src/element_ext.rscrates/biome_js_analyze/src/frameworks/unit_tests.rscrates/biome_js_analyze/src/lint/a11y/no_access_key.rscrates/biome_js_analyze/src/lint/complexity/no_comma_operator.rscrates/biome_js_analyze/src/lint/complexity/no_useless_escape_in_regex.rscrates/biome_js_analyze/src/lint/nursery/no_shadow.rscrates/biome_js_analyze/src/lint/nursery/use_test_hooks_on_top.rscrates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rscrates/biome_js_analyze/src/lint/suspicious/no_assign_in_expressions.rscrates/biome_js_analyze/src/services/semantic_class.rscrates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/invalid.jscrates/biome_js_analyze/tests/specs/complexity/noUselessEscapeInRegex/valid.jscrates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.options.jsoncrates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreFuncTypeParam/invalid.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.options.jsoncrates/biome_js_analyze/tests/specs/nursery/noShadow/invalidNoIgnoreTypeValueShadow/invalid.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/invalid-05.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-05.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-06.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/typescript-eslint/valid-07.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/valid-func-type-param.tscrates/biome_js_analyze/tests/specs/nursery/noShadow/valid-type-value-shadow.tscrates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/invalid.jscrates/biome_js_analyze/tests/specs/nursery/useTestHooksOnTop/valid.jscrates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExportDefaultNamed.tscrates/biome_js_analyze/tests/specs/style/useReadonlyClassProperties/invalid_classExpression.tscrates/biome_js_analyze/tests/specs/suspicious/noAssignInExpressions/valid-svelte-const.sveltecrates/biome_js_parser/src/lexer/mod.rscrates/biome_js_parser/src/lexer/tests.rscrates/biome_js_parser/tests/js_test_suite/ok/unicode_codepoint_escape_surrogates.jscrates/biome_js_parser/tests/spec_test.rscrates/biome_js_syntax/src/file_source.rscrates/biome_lsp/src/server.rscrates/biome_markdown_formatter/src/markdown/auxiliary/inline_italic.rscrates/biome_markdown_formatter/src/verbatim.rscrates/biome_markdown_formatter/tests/specs/markdown/inline_italic.mdcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-343.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-383.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-390.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-440.md.prettier-snapcrates/biome_markdown_formatter/tests/specs/prettier_ignored_testscrates/biome_resolver/src/lib.rscrates/biome_resolver/tests/spec_tests.rscrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/no_shadow.rscrates/biome_rule_options/src/use_test_hooks_on_top.rscrates/biome_service/src/file_handlers/html/parse_embedded_nodes.rscrates/biome_service/src/file_handlers/html/parse_embedded_nodes.tests.rscrates/biome_service/src/file_handlers/svelte.rspackage.jsonpackages/@biomejs/backend-jsonrpc/package.jsonpackages/@biomejs/js-api/package.jsonpackages/aria-data/package.jsonpackages/prettier-compare/package.jsonpackages/tailwindcss-config-analyzer/package.jsonxtask/codegen/html.ungramxtask/codegen/src/generate_migrate_eslint.rsxtask/codegen/src/generate_nodes.rsxtask/codegen/src/generate_syntax_kinds.rsxtask/codegen/src/html_kinds_src.rsxtask/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 | |||
There was a problem hiding this comment.
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.
| --- | ||
| "@biomejs/biome": patch | ||
| --- |
There was a problem hiding this comment.
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.
| --- | ||
| "@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. |
There was a problem hiding this comment.
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.
| #[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, | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
π§© 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_eslintRepository: 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.
| #[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).
| if matches!( | ||
| typed_node, | ||
| AnyRuleStart::CssMediaAtRule(_) | AnyRuleStart::CssSupportsAtRule(_) | ||
| AnyRuleStart::CssMediaAtRule(_) | ||
| | AnyRuleStart::CssScopeAtRule(_) | ||
| | AnyRuleStart::CssSupportsAtRule(_) | ||
| ) { |
There was a problem hiding this comment.
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.
| // 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)); |
There was a problem hiding this comment.
π§© 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.rsRepository: 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.
| // 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.
| if !p.eat(T![')']) { | ||
| p.error(expected_vue_v_for_tuple_binding_end(p, p.cur_range())); | ||
| } |
There was a problem hiding this comment.
π§© 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.rsRepository: 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.
| 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).
| 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()?; | ||
|
|
There was a problem hiding this comment.
π§© 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:
- 1: https://nodejs.org/api/test.html
- 2: https://nodejs.org/docs/latest-v21.x/api/test.html
- 3: https://github.com/nodejs/node/blob/main/doc/api/test.md
- 4: https://nodejs.org/download/v8-canary/v19.0.0-v8-canary202207016db4822adc/docs/api/test.html
- 5: test runner: async callbacks passed to describe are note awaitedΒ nodejs/node#48845
π Script executed:
# First, check if the file exists and read the relevant lines
wc -l crates/biome_js_analyze/src/frameworks/unit_tests.rsRepository: 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.rsRepository: 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.rsRepository: 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 -20Repository: 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.rsRepository: 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 -20Repository: 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.rsRepository: 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.rsRepository: 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.rsRepository: 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_analyzeRepository: 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 -30Repository: 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 -A2Repository: 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_syntaxRepository: 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 -100Repository: 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 -80Repository: 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.rsRepository: 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 -10Repository: 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 -20Repository: 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.jsRepository: 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.rsRepository: 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.
| // 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; | ||
| } |
There was a problem hiding this comment.
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.
| FileSystemWatcher { | ||
| glob_pattern: GlobPattern::Relative(RelativePattern { | ||
| pattern: "**/.biome.{json,jsonc}".to_string(), | ||
| base_uri: OneOf::Left(folder.clone()), | ||
| }), | ||
| kind: Some(WatchKind::all()), | ||
| }, |
There was a problem hiding this comment.
π§© 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
doneRepository: 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 -nRepository: 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
fiRepository: 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.rsRepository: 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 -nRepository: 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.rsRepository: 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 15Repository: 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 -30Repository: 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 2Repository: 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.
There was a problem hiding this comment.
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 | π‘ MinorAdd a Vue v-for regression fixture to test this path.
The change to
has_label_attribute_valuenow handlesVueVForValuevia the_ => falsecatch-all. Existing Vue test fixtures fornoLabelWithoutControldo not coverv-fordirectives, leaving this code path unexercised. Add a snapshot fixture withv-forusage to lock in the behaviourβfor example, an input withv-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
β Files ignored due to path filters (3)
crates/biome_cli/tests/specs/migrate_eslint/typescriptExplicitFunctionReturnType/basic.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/severity_only.jsonc.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/specs/migrate_eslint/typescriptNoShadow/with_options.jsonc.snapis excluded by!**/*.snapand included by**
π Files selected for processing (1)
crates/biome_html_analyze/src/lint/a11y/no_label_without_control.rs
Summary
Main into next
Important
Don't use squash merge
Test Plan
Docs