-
-
Notifications
You must be signed in to change notification settings - Fork 805
feat(analyze/html/vue): add a few more simple vue lint rules #8583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 657a687 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #8583 will not alter performanceComparing Summary
Footnotes
|
c4df644 to
d07746f
Compare
WalkthroughAdds four new nursery HTML lint rules for Vue: Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (4)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)
52-56: Consider adding rustdoc forViolationKind.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_contentsuggests 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 tohas_childrenorhas_contentfor 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 haverecommended: 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_rowanimports could be combined into a singleusestatement.🔎 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
⛔ Files ignored due to path filters (13)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_analyze/src/lint/nursery.rsis excluded by!**/nursery.rsand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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 thedbg!()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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs.changeset/v-cloak-rule.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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
runfunction logic matches the established pattern fromuse_vue_valid_v_once.rsanduse_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) andMustHaveContent(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 conditionalJsonSchemaunder theschemafeature. 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 thesrcattribute / 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
srcis present, and appropriately returnsNonefor theMustHaveContentcase where no automatic fix is sensible.
43-43: The codebase shows that all Vue-related nursery rules incrates/biome_html_analyze/src/lint/nursery/consistently userecommended: true(13 out of 16 nursery rules shown), notfalse. 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 havingrecommended: 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.
.changeset/add-template-root-rule.md
Outdated
|
|
||
| ```vue | ||
| <template src="./foo.html"></template> | ||
| ``` No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
| pub UseVueValidVPre { | ||
| version: "next", | ||
| name: "useVueValidVPre", | ||
| language: "html", | ||
| recommended: true, | ||
| domains: &[RuleDomain::Vue], | ||
| sources: &[RuleSource::EslintVueJs("valid-v-pre").same()], | ||
| fix_kind: FixKind::Unsafe, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ 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.
03cbad1 to
ec72dde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ 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-cloakandv-oncerules 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_contentis 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 tohas_childrenfor 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
⛔ Files ignored due to path filters (13)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_analyze/src/lint/nursery.rsis excluded by!**/nursery.rsand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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 thedbg!()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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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
ViolationKindvariants (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-onceandv-prerules. 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
MustBeEmptybranch correctly removes inline content, and returningNoneforMustHaveContentis sensible since auto-generating template content isn't feasible.
|
Hi @dyc3, 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! |
|
@playhardgopro its on my todo list! but I'll probably do it in a different PR |
cae492c to
aa15832
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)
41-49: Nursery rules should haverecommended: false.Line 45 sets
recommended: true, but per CONTRIBUTING.md, new nursery rules should berecommended: falseuntil 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
Debugwould help when usingdbg!()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
⛔ Files ignored due to path filters (13)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_analyze/src/lint/nursery.rsis excluded by!**/nursery.rsand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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 thedbg!()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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rs.changeset/v-pre-rule.mdcrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/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.vuecrates/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.vuecrates/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.vuecrates/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.vuecrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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
runlogic 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 returnsNoneforMustHaveContentsince content can't be auto-generated.
76-85: Renamehas_non_whitespace_contentto 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 asHtmlContent) would count as content here. Rename tohas_childrenfor 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::Unsafeis appropriate since the rule provides an auto-fix viaaction().
58-160: Implementation is solid and consistent with sibling rules.The
run()→diagnostic()→action()flow is clean. The logic correctly mirrors the established patterns fromuse_vue_valid_v_preanduse_vue_valid_v_once, which makes maintenance straightforward.
| pub UseVueValidTemplateRoot { | ||
| version: "next", | ||
| name: "useVueValidTemplateRoot", | ||
| language: "html", | ||
| recommended: true, | ||
| domains: &[RuleDomain::Vue], | ||
| sources: &[RuleSource::EslintVueJs("valid-template-root").same()], | ||
| fix_kind: FixKind::Unsafe, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
aa15832 to
5e3884a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs (1)
41-49: Nursery rules should haverecommended: falseand anissue_numberfield.This issue was already flagged in a previous review. Line 45 should set
recommended: false, and the rule metadata should include anissue_numberfield 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
⛔ Files ignored due to path filters (13)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_analyze/src/lint/nursery.rsis excluded by!**/nursery.rsand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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 thedbg!()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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/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.mdcrates/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.mdcrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.changeset/v-cloak-rule.mdcrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/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.vuecrates/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.vuecrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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.mdcrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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.rscrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/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.foois removed, requiring multiple fix applications. Is this intentional to keep fixes atomic, or should all modifiers be removed in a single action?
ematipico
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few nits around docs
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rs
Outdated
Show resolved
Hide resolved
crates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rs
Outdated
Show resolved
Hide resolved
5e3884a to
657a687
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 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 berecommended: falseuntil 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 addingissue_numberfield to track this nursery rule.Per repository conventions, nursery rules typically include an
issue_numberfield 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 likeuse_vue_valid_v_ifreport 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 addingissue_numberfield to track this nursery rule.Similar to the v-pre rule, consider adding an
issue_numberfield 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
⛔ Files ignored due to path filters (13)
crates/biome_configuration/src/analyzer/linter/rules.rsis excluded by!**/rules.rsand included by**crates/biome_diagnostics_categories/src/categories.rsis excluded by!**/categories.rsand included by**crates/biome_html_analyze/src/lint/nursery.rsis excluded by!**/nursery.rsand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vue.snapis excluded by!**/*.snapand included by**crates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vue.snapis excluded by!**/*.snapand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 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.mdcrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_cloak.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_once.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVCloak/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/valid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/valid.vuecrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_rule_options/src/use_vue_valid_v_cloak.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/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 thedbg!()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.rscrates/biome_rule_options/src/use_vue_valid_v_once.rscrates/biome_rule_options/src/lib.rscrates/biome_rule_options/src/use_vue_valid_template_root.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/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.vuecrates/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.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidTemplateRoot/invalid.vuecrates/biome_html_analyze/tests/specs/nursery/useVueValidVOnce/invalid.vuecrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_rule_options/src/lib.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.rscrates/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.rscrates/biome_html_analyze/tests/specs/nursery/useVueValidVPre/invalid.vuecrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_template_root.rscrates/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.rscrates/biome_html_analyze/src/lint/nursery/use_vue_valid_v_pre.rscrates/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.vuecrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/biome_rule_options/src/lib.rscrates/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.rscrates/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
srcthat contains content, and an empty template withoutsrc.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 withsrcbut 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_contentbut 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.
| 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, | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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.rsRepository: 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 -30Repository: 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 -40Repository: 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 -20Repository: 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 -40Repository: 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 -40Repository: 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.rsRepository: 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 -50Repository: 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 -30Repository: 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.rsRepository: 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.

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