Skip to content

Conversation

@dyc3
Copy link
Contributor

@dyc3 dyc3 commented Dec 26, 2025

Summary

This adds a few more Vue HTML lint rules. The reason I put them all in one PR is because they are all pretty trivial, logic wise.

Almost completely AI generated, except for some manual tweaking of the diagnostics.

Test Plan

snapshots

Docs

@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2025

🦋 Changeset detected

Latest commit: 657a687

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

Copy link
Contributor Author

dyc3 commented Dec 26, 2025

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter A-Diagnostic Area: diagnostocis L-HTML Language: HTML and super languages labels Dec 26, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 26, 2025

CodSpeed Performance Report

Merging #8583 will not alter performance

Comparing dyc3/more-vue-rules (657a687) with main (a3a1ad2)1

Summary

✅ 1 untouched
⏩ 154 skipped2

Footnotes

  1. No successful run was found on main (1df2121) during the generation of this report, so a3a1ad2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 154 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dyc3 dyc3 force-pushed the dyc3/more-vue-rules branch from c4df644 to d07746f Compare December 26, 2025 20:53
@dyc3 dyc3 marked this pull request as ready for review December 26, 2025 20:53
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 26, 2025

Walkthrough

Adds four new nursery HTML lint rules for Vue: useVueValidTemplateRoot, useVueValidVOnce, useVueValidVCloak, and useVueValidVPre. Rules are implemented in crates/biome_html_analyze with diagnostics and unsafe fixers where applicable; several new public ViolationKind enums and lint declarations were introduced. Corresponding empty options structs and module exports were added under crates/biome_rule_options. Test fixtures (valid/invalid) for each rule and changelog entries (.changeset) were also added.

Suggested reviewers

  • ematipico
  • mdevils

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding multiple simple Vue HTML lint rules.
Description check ✅ Passed The description explains the motivation and notes that the implementation is AI-generated with manual tweaking.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dyc3/more-vue-rules

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (4)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)

52-56: Consider adding rustdoc for ViolationKind.

Per coding guidelines, use inline rustdoc documentation for rules and their options. A brief doc comment explaining the enum variants would improve maintainability.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (1)

77-77: Variable name may be slightly misleading.

has_non_whitespace_content suggests whitespace is being filtered, but !element.children().is_empty() only checks if the children list is non-empty (whitespace text nodes would still count as children). Consider renaming to has_children or has_content for clarity, unless the parser indeed strips whitespace-only nodes.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (2)

45-45: Nursery rules should typically have recommended: false.

Same as the template root rule - per learnings, nursery rules should default to recommended: false.


7-8: Consider consolidating imports.

Minor nit: the two biome_rowan imports could be combined into a single use statement.

🔎 Proposed fix
-use biome_rowan::BatchMutationExt;
-use biome_rowan::{AstNode, TextRange};
+use biome_rowan::{AstNode, BatchMutationExt, TextRange};
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0196c0e and d07746f.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snap is excluded by !**/*.snap 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 **
📒 Files selected for processing (21)
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
🧠 Learnings (40)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*valid* : Create test files prefixed with `valid` for code that should not trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-04T13:29:49.287Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `Box<[T]>` instead of `Vec<T>` for rule options arrays to save memory

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • .changeset/v-pre-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Valid code examples in rule documentation should not trigger any diagnostics

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Invalid code examples in rule documentation must be marked with `expect_diagnostic` code block property

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-11-21T01:10:53.059Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8171
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:125-137
Timestamp: 2025-11-21T01:10:53.059Z
Learning: In the Biome codebase, each lint rule has its own options type declaration (e.g., `type Options = RuleNameOptions`) as part of the codegen process, even if the options struct is empty or unused. This is standard practice and should not be flagged as an issue.

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-22T09:26:56.943Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:26:56.943Z
Learning: When defining lint rules (declare_lint_rule!), only specify fix_kind if the rule implements an action(...) function. Rules that only emit diagnostics without a code fix should omit fix_kind. This applies to all Rust lint rule definitions under crates/.../src/lint (e.g., crates/biome_js_analyze/src/lint/...).

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • .changeset/v-pre-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group

Applied to files:

  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • .changeset/v-pre-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For rule changes in changesets, clearly demonstrate what is now invalid that wasn't before, or vice versa

Applied to files:

  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`

Applied to files:

  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`

Applied to files:

  • .changeset/v-pre-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*.jsonc : Use `.jsonc` files to contain arrays of code snippet strings for snapshot tests

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `ignore` code block property to exclude documentation code examples from automatic validation

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new lint rules in changesets, show an example of invalid case in inline code or code block

Applied to files:

  • .changeset/add-template-root-rule.md
🧬 Code graph analysis (4)
crates/biome_rule_options/src/use_vue_valid_v_pre.rs (3)
crates/biome_rule_options/src/use_vue_valid_v_text.rs (1)
  • UseVueValidVTextOptions (6-6)
crates/biome_rule_options/src/use_vue_valid_v_html.rs (1)
  • UseVueValidVHtmlOptions (6-6)
crates/biome_rule_options/src/use_vue_valid_v_else.rs (1)
  • UseVueValidVElseOptions (6-6)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (3)
  • run (61-88)
  • diagnostic (90-119)
  • action (121-136)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
🪛 GitHub Actions: Pull request Markdown
.changeset/add-template-root-rule.md

[error] 27-27: markdownlint: MD047/single-trailing-newline - Files should end with a single newline character.

🪛 GitHub Check: lint
.changeset/add-template-root-rule.md

[failure] 27-27: Files should end with a single newline character
.changeset/add-template-root-rule.md:27:3 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md047.md

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Check JS Files
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: autofix
🔇 Additional comments (26)
crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue (1)

1-2: LGTM!

Valid test fixture for v-cloak directive.

.changeset/v-pre-rule.md (1)

1-5: LGTM!

Changeset properly documents the new nursery rule.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue (1)

1-4: LGTM!

Test fixture comprehensively covers all three invalid v-cloak scenarios.

crates/biome_rule_options/src/use_vue_valid_template_root.rs (1)

1-6: LGTM!

Options struct follows all required patterns and derives for rule options.

crates/biome_rule_options/src/use_vue_valid_v_pre.rs (1)

1-6: LGTM!

Options struct correctly implements all required traits and follows the established pattern.

crates/biome_rule_options/src/use_vue_valid_v_cloak.rs (1)

1-6: LGTM!

Options struct is correctly implemented with all required derives and attributes.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (4)

11-50: Well-structured rule declaration.

The documentation is clear and includes appropriate examples of both valid and invalid usage.


52-83: LGTM!

ViolationKind enum and run() function correctly identify the three violation types.


85-118: Clear and helpful diagnostics.

The diagnostic messages provide good context for each violation type.


120-160: LGTM!

The action function properly removes the offending parts via batch mutation, consistent with the v-pre rule pattern.

.changeset/v-cloak-rule.md (1)

1-5: LGTM!

Changeset correctly documents the new nursery rule with appropriate link.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)

64-83: Implementation correctly mirrors sibling rules.

The run function logic matches the established pattern from use_vue_valid_v_once.rs and use_vue_valid_v_cloak.rs. The priority order (argument → modifier → value) is consistent across all three rules.


85-159: Diagnostic and action implementations look good.

The diagnostic messages are clear and contextual. The fix actions correctly remove the offending nodes. Implementation is consistent with sibling rules.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue (1)

1-10: Test coverage is comprehensive.

All three violation types (argument, modifier, value) are exercised. This aligns well with the test file naming conventions for invalid cases.

.changeset/add-v-once-rule.md (1)

1-5: Changeset looks good.

Patch-level bump is appropriate for a new nursery rule, and the documentation link follows the expected pattern.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue (1)

1-10: Test fixture covers all violation scenarios.

All three invalid usage patterns (:arg, .mod, ="value") are present. Matches the structure of the v-once tests.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue (1)

1-3: Both violation scenarios covered.

The test exercises both MustBeEmpty (template with src + content) and MustHaveContent (empty template without src) cases.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue (1)

1-5: Solid valid case coverage.

Good thinking to include an unrelated directive (v-text) to ensure the rule doesn't trigger false positives.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue (1)

1-5: Valid test mirrors v-once pattern.

Consistent structure with sibling test files. The unrelated directive check is a nice touch.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue (1)

1-3: Both valid template patterns covered.

Inline content and external src reference are both tested. Pairs nicely with the invalid cases.

crates/biome_rule_options/src/use_vue_valid_v_once.rs (1)

1-6: LGTM!

The options struct follows the expected conventions: correct derives, deny_unknown_fields, rename_all = "camelCase", and conditional JsonSchema under the schema feature. As per learnings, this is the proper pattern for rule options.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (3)

61-88: LGTM on the core logic.

The rule correctly identifies top-level <template> elements and validates the src attribute / content relationship. The approach aligns with the similar Vue directive rules in this PR.


121-136: LGTM on the unsafe fix implementation.

The action correctly removes inline content when src is present, and appropriately returns None for the MustHaveContent case where no automatic fix is sensible.


43-43: The codebase shows that all Vue-related nursery rules in crates/biome_html_analyze/src/lint/nursery/ consistently use recommended: true (13 out of 16 nursery rules shown), not false. This is the established convention for Vue rules in this crate.

Additionally, since the rule specifies domains: &[RuleDomain::Vue], it's only enabled when the Vue domain is explicitly enabled—achieving the same opt-in behaviour despite having recommended: true.

This setting is correct and should not be changed.

Likely an incorrect or invalid review comment.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (2)

64-83: LGTM on the run logic.

The directive validation correctly checks for arguments, modifiers, and values in order, matching the established pattern from use_vue_valid_v_pre.rs.


120-158: LGTM on the action implementation.

Each violation type is handled with appropriate AST mutations and descriptive action messages. Consistent with the v-pre rule pattern.


```vue
<template src="./foo.html"></template>
``` No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add a trailing newline.

The pipeline is failing due to a missing newline at end of file (MD047).

🔎 Proposed fix
 ```vue
 <template src="./foo.html"></template>
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **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.

```suggestion

🧰 Tools
🪛 GitHub Actions: Pull request Markdown

[error] 27-27: markdownlint: MD047/single-trailing-newline - Files should end with a single newline character.

🪛 GitHub Check: lint

[failure] 27-27: Files should end with a single newline character
.changeset/add-template-root-rule.md:27:3 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.40.0/doc/md047.md

🤖 Prompt for AI Agents
.changeset/add-template-root-rule.md around line 27: the file is missing a final
trailing newline causing MD047; open the file and add a single newline character
at the end of the file so the file ends with a newline (ensure the last line
terminator is present and commit the change).

Comment on lines +41 to +50
pub UseVueValidVPre {
version: "next",
name: "useVueValidVPre",
language: "html",
recommended: true,
domains: &[RuleDomain::Vue],
sources: &[RuleSource::EslintVueJs("valid-v-pre").same()],
fix_kind: FixKind::Unsafe,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Nursery rules should have recommended: false.

Based on learnings from the repository's CONTRIBUTING.md, new rules in the nursery group should set recommended to false until they graduate. Line 45 currently sets recommended: true.

Additionally, consider adding an issue_number field to track the work-in-progress rule.

🔎 Proposed fix
     pub UseVueValidVPre {
         version: "next",
         name: "useVueValidVPre",
         language: "html",
-        recommended: true,
+        recommended: false,
         domains: &[RuleDomain::Vue],
         sources: &[RuleSource::EslintVueJs("valid-v-pre").same()],
         fix_kind: FixKind::Unsafe,
     }

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs around
lines 41 to 49, the nursery rule is incorrectly marked recommended: true; change
recommended to false and add an issue_number field (e.g., issue_number:
Some(<ISSUE_NUMBER>)) to track the WIP rule; ensure the new field follows
existing rule struct ordering and use the same Option pattern as other nursery
rules in the crate.

@dyc3 dyc3 force-pushed the dyc3/more-vue-rules branch from 03cbad1 to ec72dde Compare December 26, 2025 20:59
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)

1-160: LGTM!

The implementation mirrors the v-cloak and v-once rules precisely. The directive validation logic and unsafe fixer are correctly implemented.

🧹 Nitpick comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (1)

76-85: Consider clarifying the variable name.

The variable has_non_whitespace_content is named as if it filters out whitespace-only content, but !element.children().is_empty() checks for any child nodes, including whitespace text nodes (if the parser preserves them). If the intent is to check for "any children", consider renaming to has_children for clarity. If the intent truly is to ignore whitespace-only content, additional filtering would be needed.

🔎 Suggested rename (if checking for any children)
-        let has_non_whitespace_content = !element.children().is_empty();
+        let has_children = !element.children().is_empty();

         if has_src {
-            if has_non_whitespace_content {
+            if has_children {
                 return Some(ViolationKind::MustBeEmpty(element));
             }
-        } else if !has_non_whitespace_content {
+        } else if !has_children {
             return Some(ViolationKind::MustHaveContent(element));
         }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d07746f and ec72dde.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snap is excluded by !**/*.snap 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 **
📒 Files selected for processing (21)
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
✅ Files skipped from review due to trivial changes (2)
  • .changeset/v-cloak-rule.md
  • .changeset/add-v-once-rule.md
🚧 Files skipped from review as they are similar to previous changes (11)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • .changeset/add-template-root-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
🧠 Learnings (41)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `Box<[T]>` instead of `Vec<T>` for rule options arrays to save memory

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation code blocks should be ordered as language, expect_diagnostic, options/full_options/use_options, ignore, file

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-22T09:27:13.161Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use naming convention `use<Concept>` when a rule mandates a single concept

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-11-24T18:05:42.356Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:42.356Z
Learning: Applies to crates/biome_js_type_info/**/*.rs : Use `TypeReference` instead of `Arc` for types that reference other types to avoid stale cache issues when modules are replaced

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*valid* : Create test files prefixed with `valid` for code that should not trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-22T09:26:56.943Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:26:56.943Z
Learning: When defining lint rules (declare_lint_rule!), only specify fix_kind if the rule implements an action(...) function. Rules that only emit diagnostics without a code fix should omit fix_kind. This applies to all Rust lint rule definitions under crates/.../src/lint (e.g., crates/biome_js_analyze/src/lint/...).

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For promoting rules from nursery or implementing new features affecting end users, send PRs to the `next` branch

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
🧬 Code graph analysis (3)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Check JS Files
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (7)
crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue (1)

1-10: LGTM!

Solid coverage of all three ViolationKind variants (Argument, Modifier, Value). The explanatory comments are a nice touch.

crates/biome_rule_options/src/use_vue_valid_v_cloak.rs (1)

1-6: LGTM!

Clean options struct following the established pattern with correct derives and serde attributes.

crates/biome_rule_options/src/use_vue_valid_v_pre.rs (1)

1-6: LGTM!

Consistent with the other Vue rule options structs. Nothing amiss here.

crates/biome_rule_options/src/use_vue_valid_template_root.rs (1)

1-6: LGTM!

Follows the established pattern. Well done.

crates/biome_rule_options/src/lib.rs (1)

399-408: LGTM!

The new Vue rule option modules are correctly exported and alphabetically ordered. The previous ordering concern has been addressed.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (1)

1-160: LGTM!

The rule implementation is consistent with the parallel v-once and v-pre rules. The logic for detecting invalid arguments, modifiers, and values is correct, and the unsafe fixer appropriately removes the offending parts.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (1)

120-136: LGTM on the action implementation.

The MustBeEmpty branch correctly removes inline content, and returning None for MustHaveContent is sensible since auto-generating template content isn't feasible.

@playhardgopro
Copy link

Hi @dyc3,
thanks for adding these rules to the plugin

Would it be possible to also add a rule similar to require-v-for-key?

I’d be happy to contribute myself, but I’m not sufficiently familiar with Rust to do it properly :)

Thanks again!

@dyc3
Copy link
Contributor Author

dyc3 commented Dec 26, 2025

@playhardgopro its on my todo list! but I'll probably do it in a different PR

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)

41-49: Nursery rules should have recommended: false.

Line 45 sets recommended: true, but per CONTRIBUTING.md, new nursery rules should be recommended: false until graduation.

🧹 Nitpick comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (1)

52-56: Consider adding #[derive(Debug)] for easier debugging.

Not essential, but adding Debug would help when using dbg!() during development or debugging test failures.

🔎 Proposed change
+#[derive(Debug)]
 pub enum ViolationKind {
     Argument(TextRange),
     Modifier(TextRange),
     Value(TextRange),
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec72dde and aa15832.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snap is excluded by !**/*.snap 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 **
📒 Files selected for processing (21)
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
✅ Files skipped from review due to trivial changes (2)
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
🚧 Files skipped from review as they are similar to previous changes (10)
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • .changeset/add-template-root-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
🧠 Learnings (43)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `Box<[T]>` instead of `Vec<T>` for rule options arrays to save memory

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-22T09:26:56.943Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:26:56.943Z
Learning: When defining lint rules (declare_lint_rule!), only specify fix_kind if the rule implements an action(...) function. Rules that only emit diagnostics without a code fix should omit fix_kind. This applies to all Rust lint rule definitions under crates/.../src/lint (e.g., crates/biome_js_analyze/src/lint/...).

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Set `recommended` field to `false` for new rules in the nursery group

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*valid* : Create test files prefixed with `valid` for code that should not trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Invalid code examples in rule documentation must be marked with `expect_diagnostic` code block property

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-04T13:29:49.287Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Valid code examples in rule documentation should not trigger any diagnostics

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `error` for rules in correctness, security, and a11y groups

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For promoting rules from nursery or implementing new features affecting end users, send PRs to the `next` branch

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`

Applied to files:

  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For rule changes in changesets, clearly demonstrate what is now invalid that wasn't before, or vice versa

Applied to files:

  • .changeset/v-pre-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Examples` section with `### Invalid` and `### Valid` subsections

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
🧬 Code graph analysis (3)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (3)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Documentation
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix
  • GitHub Check: Check JS Files
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (15)
crates/biome_rule_options/src/use_vue_valid_v_once.rs (1)

1-6: LGTM!

Options struct follows the established pattern with correct derives and serde attributes.

.changeset/v-pre-rule.md (1)

1-5: LGTM!

Changeset properly documents the new rule with appropriate patch level.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue (1)

1-10: LGTM!

Test fixture covers all three violation kinds (argument, modifier, value) nicely.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue (1)

1-3: LGTM!

Test fixture covers both violation scenarios for the template root rule.

crates/biome_rule_options/src/use_vue_valid_v_cloak.rs (1)

1-6: LGTM!

Options struct follows the established pattern correctly.

crates/biome_rule_options/src/use_vue_valid_v_pre.rs (1)

1-6: LGTM!

Options struct follows the established pattern correctly.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)

64-83: LGTM!

The run logic correctly detects argument, modifier, and value violations in priority order.


85-118: LGTM!

Diagnostic messages are clear and provide helpful remediation notes.


120-159: LGTM!

Action implementation correctly removes the offending node for each violation kind, consistent with sibling rules.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (3)

90-119: LGTM!

Diagnostic messages are clear with helpful remediation notes for both violation kinds.


121-136: LGTM!

Action correctly provides a fix for MustBeEmpty (removing content) and sensibly returns None for MustHaveContent since content can't be auto-generated.


76-85: Rename has_non_whitespace_content to better reflect the actual check.

The variable checks !element.children().is_empty(), which simply verifies whether child nodes exist—it doesn't filter whitespace. Whitespace-only text nodes (represented as HtmlContent) would count as content here. Rename to has_children for clarity, or add a comment explaining that whitespace nodes are included.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)

1-9: LGTM!

Imports are well-organised and all are used within the implementation.


11-50: Documentation and metadata are spot on.

The rustdoc examples are clear, and the rule metadata correctly cites the eslint-vue-js source. The fix_kind: FixKind::Unsafe is appropriate since the rule provides an auto-fix via action().


58-160: Implementation is solid and consistent with sibling rules.

The run()diagnostic()action() flow is clean. The logic correctly mirrors the established patterns from use_vue_valid_v_pre and use_vue_valid_v_once, which makes maintenance straightforward.

Comment on lines +39 to +47
pub UseVueValidTemplateRoot {
version: "next",
name: "useVueValidTemplateRoot",
language: "html",
recommended: true,
domains: &[RuleDomain::Vue],
sources: &[RuleSource::EslintVueJs("valid-template-root").same()],
fix_kind: FixKind::Unsafe,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Nursery rules should have recommended: false.

Line 43 sets recommended: true, but per CONTRIBUTING.md guidelines, new nursery rules should be recommended: false until they graduate. Based on learnings from the repository.

🔎 Proposed fix
     pub UseVueValidTemplateRoot {
         version: "next",
         name: "useVueValidTemplateRoot",
         language: "html",
-        recommended: true,
+        recommended: false,
         domains: &[RuleDomain::Vue],
         sources: &[RuleSource::EslintVueJs("valid-template-root").same()],
         fix_kind: FixKind::Unsafe,
     }
🤖 Prompt for AI Agents
In crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
around lines 39–47, the nursery rule is incorrectly marked recommended: true;
update the rule metadata to set recommended: false so the new nursery rule is
not enabled by default (leave all other fields unchanged).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)

41-49: Nursery rules should have recommended: false and an issue_number field.

This issue was already flagged in a previous review. Line 45 should set recommended: false, and the rule metadata should include an issue_number field to track the work-in-progress rule.

Based on learnings.

.changeset/add-template-root-rule.md (1)

27-27: Add a trailing newline.

The file is missing a final newline, causing the MD047 linting failure in CI.

🔎 Proposed fix
 <template src="./foo.html"></template>
</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (1)</summary><blockquote>

`52-56`: **Add rustdoc documentation for the public enum.**

The `ViolationKind` enum is public but lacks documentation. Add a doc comment explaining what each variant represents.



<details>
<summary>🔎 Suggested documentation</summary>

```diff
+/// Represents the type of violation found in a v-once directive.
 pub enum ViolationKind {
+    /// The directive has an invalid argument.
     Argument(TextRange),
+    /// The directive has an invalid modifier.
     Modifier(TextRange),
+    /// The directive has an invalid value.
     Value(TextRange),
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa15832 and 5e3884a.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snap is excluded by !**/*.snap 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 **
📒 Files selected for processing (21)
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
✅ Files skipped from review due to trivial changes (1)
  • .changeset/add-v-once-rule.md
🚧 Files skipped from review as they are similar to previous changes (9)
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
🧠 Learnings (38)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new lint rules in changesets, show an example of invalid case in inline code or code block

Applied to files:

  • .changeset/add-template-root-rule.md
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`

Applied to files:

  • .changeset/add-template-root-rule.md
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development

Applied to files:

  • .changeset/add-template-root-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*valid* : Create test files prefixed with `valid` for code that should not trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
📚 Learning: 2025-12-04T13:29:49.287Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Invalid code examples in rule documentation must be marked with `expect_diagnostic` code block property

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Examples` section with `### Invalid` and `### Valid` subsections

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `Box<[T]>` instead of `Vec<T>` for rule options arrays to save memory

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-22T09:26:56.943Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:26:56.943Z
Learning: When defining lint rules (declare_lint_rule!), only specify fix_kind if the rule implements an action(...) function. Rules that only emit diagnostics without a code fix should omit fix_kind. This applies to all Rust lint rule definitions under crates/.../src/lint (e.g., crates/biome_js_analyze/src/lint/...).

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • .changeset/v-cloak-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Valid code examples in rule documentation should not trigger any diagnostics

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: In changesets, reference rules and assists with links to the website documentation

Applied to files:

  • .changeset/v-cloak-rule.md
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
🧬 Code graph analysis (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
🔇 Additional comments (8)
.changeset/v-cloak-rule.md (1)

1-5: LGTM!

Changeset correctly references the new nursery rule with a documentation link.

crates/biome_rule_options/src/use_vue_valid_v_cloak.rs (1)

1-6: LGTM!

Options struct follows all required patterns correctly with proper derives and serde attributes.

crates/biome_rule_options/src/use_vue_valid_template_root.rs (1)

1-6: LGTM!

Options struct follows all required patterns with correct derives and serde attributes.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue (1)

1-5: LGTM!

Valid test fixture appropriately covers v-once usage and ensures other directives don't trigger false positives.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue (1)

1-10: LGTM!

Invalid test fixture covers all three violation types (argument, modifier, value) that the rule detects.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue (1)

1-3: LGTM!

Valid test fixture appropriately covers both inline and external template scenarios.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue (1)

1-5: LGTM!

Valid test fixture appropriately covers v-pre usage and ensures other directives don't trigger false positives.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (1)

136-145: Confirm whether partial modifier removal is intentional.

The fix removes only the first modifier (Line 138). If a directive has multiple modifiers like v-once.foo.bar, only .foo is removed, requiring multiple fix applications. Is this intentional to keep fixes atomic, or should all modifiers be removed in a single action?

@dyc3 dyc3 requested review from a team December 28, 2025 18:33
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Looks good, just a few nits around docs

@dyc3 dyc3 force-pushed the dyc3/more-vue-rules branch from 5e3884a to 657a687 Compare December 28, 2025 20:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (1)

39-47: Nursery rule should not be recommended by default.

Line 43 still has recommended: true, but nursery rules should be recommended: false until they graduate from the nursery group.

🔎 Suggested fix
     pub UseVueValidTemplateRoot {
         version: "next",
         name: "useVueValidTemplateRoot",
         language: "html",
-        recommended: true,
+        recommended: false,
         domains: &[RuleDomain::Vue],
         sources: &[RuleSource::EslintVueJs("valid-template-root").same()],
         fix_kind: FixKind::Unsafe,
     }

Based on learnings, nursery rules should remain opt-in during development.

🧹 Nitpick comments (4)
crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue (1)

1-10: Solid test coverage for v-once violations.

The three test cases properly cover the core violation types (argument, modifier, value) that match your rule implementation. Clear comments make the intent obvious.

Optional: Consider adding one case with multiple violations combined (e.g., <div v-once:arg.mod="value"></div>) to verify the rule handles stacked violations gracefully, though the current coverage is perfectly adequate.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)

42-50: Consider adding issue_number field to track this nursery rule.

Per repository conventions, nursery rules typically include an issue_number field to track their work-in-progress status. If there's an issue tracking this rule's development, consider adding it.

Based on learnings, nursery rules should include issue tracking.


75-76: Consider batch-removing all modifiers to improve user experience.

Lines 75–76 detect only the first modifier, and the fix at lines 138–139 removes only the first one. Users with multiple modifiers (e.g., v-pre.mod1.mod2) must apply the fix multiple times. Other Vue directive rules like use_vue_valid_v_if report all violations at once, so aligning this rule to remove all invalid modifiers in a single fix would be more consistent and user-friendly.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (1)

41-49: Consider adding issue_number field to track this nursery rule.

Similar to the v-pre rule, consider adding an issue_number field if there's an issue tracking this rule's development.

Based on learnings, nursery rules should include issue tracking.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e3884a and 657a687.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snap is excluded by !**/*.snap 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 **
📒 Files selected for processing (21)
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • .changeset/v-cloak-rule.md
  • .changeset/v-pre-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
✅ Files skipped from review due to trivial changes (1)
  • .changeset/v-cloak-rule.md
🚧 Files skipped from review as they are similar to previous changes (9)
  • crates/biome_rule_options/src/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue
  • crates/biome_rule_options/src/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
  • .changeset/add-template-root-rule.md
  • .changeset/add-v-once-rule.md
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue
  • .changeset/v-pre-rule.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Use inline rustdoc documentation for rules, assists, and their options
Use the dbg!() macro for debugging output in Rust tests and code
Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
🧠 Learnings (46)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Commit rule work with message format `feat(biome_<language>_analyze): <ruleName>`
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*valid* : Create test files prefixed with `valid` for code that should not trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
📚 Learning: 2025-12-04T13:29:49.287Z
Learnt from: dyc3
Repo: biomejs/biome PR: 8291
File: crates/biome_html_formatter/tests/specs/prettier/vue/html-vue/elastic-header.html:10-10
Timestamp: 2025-12-04T13:29:49.287Z
Learning: Files under `crates/biome_html_formatter/tests/specs/prettier` are test fixtures synced from Prettier and should not receive detailed code quality reviews (e.g., HTTP vs HTTPS, formatting suggestions, etc.). These files are test data meant to validate formatter behavior and should be preserved as-is.

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Valid code examples in rule documentation should not trigger any diagnostics

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/tests/specs/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Safe` in `declare_lint_rule!` for safe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Add `issue_number` field to `declare_lint_rule!` macro for work-in-progress rules

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Specify `fix_kind: FixKind::Unsafe` in `declare_lint_rule!` for unsafe code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-22T09:26:56.943Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:26:56.943Z
Learning: When defining lint rules (declare_lint_rule!), only specify fix_kind if the rule implements an action(...) function. Rules that only emit diagnostics without a code fix should omit fix_kind. This applies to all Rust lint rule definitions under crates/.../src/lint (e.g., crates/biome_js_analyze/src/lint/...).

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should perform static analysis of source code to detect invalid or error-prone patterns and emit diagnostics with proposed fixes

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/nursery/**/*.rs : Place new rules inside the `nursery` group during development

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `declare_lint_rule!` macro to declare analyzer rule types and implement the RuleMeta trait

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `version` field to `next` in `declare_lint_rule!` macro

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `deprecated` field to `declare_lint_rule!` macro when deprecating a rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and no domains are enabled by default

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rules with `recommended: true` and domains are only enabled when the domain is enabled

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `warn` or `error` for rules in suspicious group

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For new nursery rules, send PRs to the maintenance branch `main`

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set rule severity to `error` for rules in correctness, security, and a11y groups

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-21T21:15:03.796Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-12-21T21:15:03.796Z
Learning: For promoting rules from nursery or implementing new features affecting end users, send PRs to the `next` branch

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `domains` field in `declare_lint_rule!` to tag rules that belong to specific concepts like testing or frameworks

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Set `language` field in `declare_lint_rule!` macro to the language the rule primarily applies to

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : The first paragraph of rule documentation must be a single line describing what the rule does

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `RuleSource::Eslint(...).inspired()` when implementing a rule inspired by but with different behavior than an ESLint rule

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Implement `action` function in Rule trait to provide code actions

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Each invalid code example in rule documentation must emit exactly one diagnostic

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/lint/**/*.rs : Lint rules should check syntax according to language specification and emit error diagnostics

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Invalid code examples in rule documentation must be marked with `expect_diagnostic` code block property

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Examples` section with `### Invalid` and `### Valid` subsections

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `deny_unknown_fields` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options struct must derive `Deserializable`, `Serialize`, `Deserialize`, and optionally `JsonSchema`

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `rename_all = "camelCase"` in serde derive macro for rule options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Rule options must be placed inside the `biome_rule_options` crate

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation must include `## Options` section if the rule has options

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Implement `Merge` trait for rule options to support configuration inheritance

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `options` code block property for rule-specific configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Use `Box<[T]>` instead of `Vec<T>` for rule options arrays to save memory

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `use_options` code block property for code examples that follow an options configuration in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_v_once.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Rule documentation code blocks should be ordered as language, expect_diagnostic, options/full_options/use_options, ignore, file

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Assist rules should detect refactoring opportunities and emit code action signals

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-22T09:27:13.161Z
Learnt from: ematipico
Repo: biomejs/biome PR: 8537
File: crates/biome_js_analyze/src/lint/nursery/no_leaked_render.rs:167-210
Timestamp: 2025-12-22T09:27:13.161Z
Learning: In crates/biome_analyze/**/*analyze/src/**/*.rs, the `fix_kind` field in `declare_lint_rule!` should only be specified when the rule implements the `action` function. Rules that only emit diagnostics without providing code fixes should not include `fix_kind` in their metadata.

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use naming convention `use<Concept>` when a rule mandates a single concept

Applied to files:

  • crates/biome_rule_options/src/lib.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Use `full_options` code block property for complete biome.json configuration snippets in documentation

Applied to files:

  • crates/biome_rule_options/src/use_vue_valid_template_root.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/*analyze/src/**/*.rs : Add `sources` field with `RuleSource` to cite ESLint or other rules that inspired the implementation

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
🧬 Code graph analysis (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (65-84)
  • diagnostic (86-119)
  • action (121-160)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (3)
  • run (65-84)
  • diagnostic (86-119)
  • action (121-160)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (3)
  • run (64-83)
  • diagnostic (85-118)
  • action (120-159)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs (3)
  • run (65-84)
  • diagnostic (86-119)
  • action (121-160)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Validate rules documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Documentation
  • GitHub Check: Check JS Files
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: autofix
  • GitHub Check: Test Node.js API
🔇 Additional comments (10)
crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue (1)

1-10: Test fixture correctly covers all violation cases.

The three test cases appropriately exercise the argument, modifier, and value violations that the rule detects.

crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue (1)

1-4: Test fixture correctly covers all violation cases.

The three test cases appropriately exercise argument, modifier, and value violations for the v-cloak directive.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs (1)

74-75: Modifier handling mirrors v-pre rule limitation.

Like the v-pre rule, this implementation only detects and removes the first modifier. If multiple modifiers exist on a v-cloak directive, the fix must be applied repeatedly. Consider whether this is the desired behaviour or if all modifiers should be removed at once.

Also applies to: 137-138

crates/biome_rule_options/src/use_vue_valid_v_once.rs (1)

1-6: Options struct follows conventions correctly.

The empty options struct is properly configured with all required traits and serde attributes. This is appropriate for a rule that doesn't require user configuration.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue (1)

1-3: Test coverage looks good.

The invalid fixture correctly tests both violation scenarios: a template with src that contains content, and an empty template without src.

crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue (1)

1-3: Valid cases properly covered.

The fixture correctly demonstrates both valid scenarios: inline content without src, and external reference with src but no inline content.

crates/biome_rule_options/src/lib.rs (1)

404-413: Module exports are correctly ordered.

The new Vue rule option modules are properly declared and in alphabetical order. The previous ordering issue has been resolved.

crates/biome_rule_options/src/use_vue_valid_template_root.rs (1)

1-6: Options struct properly configured.

Follows all required conventions with correct derives and serde attributes.

crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs (2)

76-77: Variable name may not match implementation.

Line 77 names the variable has_non_whitespace_content but only checks !element.children().is_empty(), which counts any children including whitespace-only text nodes. If whitespace-only templates should be treated as empty, additional logic would be needed to check the actual text content.

Could you confirm whether a template containing only whitespace (e.g., <template> </template>) should trigger the "must have content" diagnostic? The current implementation treats it as having content.


90-119: Clear and helpful diagnostics.

The diagnostic messages are well-written with helpful context notes that guide users toward resolution.

Comment on lines +121 to +136
fn action(ctx: &RuleContext<Self>, state: &Self::State) -> Option<crate::HtmlRuleAction> {
match state {
// Unsafe fix: remove the content when `src` is present
ViolationKind::MustBeEmpty(el) => {
let mut mutation = BatchMutationExt::begin(ctx.root());
mutation.remove_node(el.children());
Some(biome_analyze::RuleAction::new(
ctx.metadata().action_category(ctx.category(), ctx.group()),
ctx.metadata().applicability(),
markup! { "Remove inline content from `<template>`." }.to_owned(),
mutation,
))
}
ViolationKind::MustHaveContent(_el) => None,
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Search for remove_node usage patterns with children()
rg -A 2 -B 2 'remove_node.*children' --type rust crates/biome_html_analyze/

Repository: biomejs/biome

Length of output: 733


🏁 Script executed:

# Check the declare_lint_rule! macro in this specific file to see if fix_kind is specified
head -50 crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs

Repository: biomejs/biome

Length of output: 1455


🏁 Script executed:

# Also search for remove_node patterns more broadly to understand common usage
rg 'remove_node\(' --type rust -A 1 crates/biome_html_analyze/ | head -30

Repository: biomejs/biome

Length of output: 2071


🏁 Script executed:

# Search for remove_node implementation/trait to see if it accepts collections
rg 'fn remove_node' --type rust -A 3 crates/biome_rowan/

Repository: biomejs/biome

Length of output: 301


🏁 Script executed:

# Check the BatchMutationExt trait specifically
rg 'impl.*BatchMutationExt' --type rust -A 20 crates/biome_rowan/

Repository: biomejs/biome

Length of output: 1467


🏁 Script executed:

# Look at the type returned by el.children() to understand what's being passed
rg 'fn children' --type rust -B 2 -A 2 crates/biome_html_syntax/ | head -40

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Check what type children() returns
rg 'type.*Children|fn children' --type rust -A 1 crates/biome_html_syntax/src/ | head -20

Repository: biomejs/biome

Length of output: 421


🏁 Script executed:

# Look for how other code handles removing multiple children
rg -B 3 -A 3 'for.*children\(\).*remove' --type rust crates/biome_html_analyze/ | head -40

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Verify the exact implementation to see if this is actually a bug
cat -n crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs | sed -n '120,136p'

Repository: biomejs/biome

Length of output: 943


🏁 Script executed:

# Check if there's any working iteration pattern in related files
rg 'for.*in.*\.children\(\)' --type rust crates/biome_html_analyze/ -A 3 | head -40

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Check if SyntaxNodeChildren implements AstNode or if there's a trait impl that converts it
rg 'impl.*AstNode.*SyntaxNodeChildren|impl.*From.*SyntaxNodeChildren' --type rust crates/biome_rowan/

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Search for any generic implementations of remove_node that might accept iterables
rg 'fn remove_node' --type rust -B 2 -A 10 crates/biome_rowan/src/ast/batch.rs

Repository: biomejs/biome

Length of output: 466


🏁 Script executed:

# Check if there are any other examples of removing multiple children in the codebase
rg 'for.*children\(\)' --type rust crates/biome_html_analyze/ -B 2 -A 5 | head -50

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Check the actual type signature - confirm SyntaxNodeChildren doesn't implement AstNode
rg 'pub struct SyntaxNodeChildren|impl.*SyntaxNodeChildren' --type rust crates/biome_rowan/ -A 2 | head -30

Repository: biomejs/biome

Length of output: 1152


🏁 Script executed:

# Try to compile just this file to see if there's a compilation error
cd crates/biome_html_analyze && cargo check 2>&1 | grep -A 5 "use_vue_valid_template_root"

Repository: biomejs/biome

Length of output: 39


🏁 Script executed:

# Check git history to see if this code was recently added or if there's a known issue
git log --oneline -20 crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs

Repository: biomejs/biome

Length of output: 126


This code has a compilation error—remove_node() expects a single node, not a collection.

The method signature requires T: AstNode, but el.children() returns an Iterator. You need to iterate over the children and remove each one individually:

for child in el.children() {
    mutation.remove_node(child);
}

The fix kind is correctly specified as FixKind::Unsafe in the rule declaration.

🤖 Prompt for AI Agents
In crates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rs
around lines 121 to 136, the call mutation.remove_node(el.children()) fails to
compile because remove_node expects a single AstNode, not an iterator; replace
that single call by iterating over el.children() and calling
mutation.remove_node(child) for each child (i.e., loop over the children and
remove them individually) so the BatchMutation removes each node correctly while
keeping the FixKind::Unsafe as declared.

Copy link
Contributor Author

dyc3 commented Dec 28, 2025

Merge activity

  • Dec 28, 8:40 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 28, 8:40 PM UTC: @dyc3 merged this pull request with Graphite.

@dyc3 dyc3 merged commit 83be210 into main Dec 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants