Skip to content

Conversation

@dyc3
Copy link
Contributor

@dyc3 dyc3 commented Dec 27, 2025

Summary

This adds 2 new vue html lint rules that I consider to be a little more high value, but they are still pretty simple.

  • useVueConsistentVBindStyle
  • useVueConsistentVOnStyle

It's mostly AI generated, but I had to intervene pretty heavily for writing the diagnostic messages, and the code fix. Of course I reviewed it myself to make sure it wasn't doing anything crazy stupid.

I chose to implement some of the options for the source rule because the logic was trivial.

Test Plan

snapshots

Docs

@changeset-bot
Copy link

changeset-bot bot commented Dec 27, 2025

🦋 Changeset detected

Latest commit: 1d5df15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor Author

dyc3 commented Dec 27, 2025

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter A-Diagnostic Area: diagnostocis L-HTML Language: HTML and super languages labels Dec 27, 2025
@dyc3 dyc3 marked this pull request as ready for review December 27, 2025 15:28
@dyc3 dyc3 force-pushed the dyc3/more-vue-rules branch from aa15832 to 5e3884a Compare December 28, 2025 18:18
@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from 204192f to d45faf3 Compare December 28, 2025 18:18
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Nothing blocking, but it would be nice if we could use the try operator a bit more as we do in all rules

@dyc3 dyc3 force-pushed the dyc3/more-vue-rules branch from 5e3884a to 657a687 Compare December 28, 2025 20:24
@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from d45faf3 to 3abd143 Compare December 28, 2025 20:39
@dyc3 dyc3 changed the base branch from dyc3/more-vue-rules to graphite-base/8586 December 28, 2025 20:40
@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from 3abd143 to 79b9249 Compare December 28, 2025 20:41
@dyc3 dyc3 force-pushed the graphite-base/8586 branch from 657a687 to 83be210 Compare December 28, 2025 20:41
@graphite-app graphite-app bot changed the base branch from graphite-base/8586 to main December 28, 2025 20:42
@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from 79b9249 to 07548c6 Compare December 28, 2025 20:42
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 28, 2025

Walkthrough

This pull request adds two new Vue nursery lint rules: UseVueConsistentVBindStyle and UseVueConsistentVOnStyle. Each rule enforces a consistent directive style (shorthand vs longhand), emits diagnostics, supports auto-fixing by rewriting directives, introduces configuration option types with a VueDirectiveStyle enum and defaults, and includes test fixtures (valid/invalid) plus changeset entries and rule-options module exports.

Possibly related PRs

Suggested reviewers

  • ematipico
  • mdevils

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the primary change: adding two new Vue HTML lint rules for v-bind and v-on style consistency.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation, implementation approach, and acknowledging AI assistance as required.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dyc3/vue-directive-style-rules

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (6)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs (3)

12-14: Consider splitting the doc comment for readability.

The doc comment could be formatted across multiple lines for better readability, separating the rule description from the preference statement.

Suggested format
-    /// Enforce a consistent style for `v-bind` in Vue templates. Prefer either shorthand (`:prop="..."`) or longhand (`v-bind:prop="..."`).
+    /// Enforce a consistent style for `v-bind` in Vue templates.
+    ///
+    /// Prefer either shorthand (`:prop="..."`) or longhand (`v-bind:prop="..."`).

152-157: Inconsistent action message phrasing with v-on rule.

The v-on rule uses "Rewrite to shorthand '@' syntax." but this rule uses "Remove v-bind to use the shorthand ':' syntax.". For consistency, consider aligning the phrasing.

Suggested fix
-                    markup! { "Remove v-bind to use the shorthand ':' syntax." }.to_owned(),
+                    markup! { "Rewrite to shorthand ':' syntax." }.to_owned(),

160-172: Use .ok()? for cleaner control flow.

The if let Ok(arg) pattern causes the action to be returned even when sh.arg() fails (mutation would be empty). Using .ok()? would return None early if the argument extraction fails.

Suggested fix
             // Convert shorthand :prop to v-bind:prop
             (AnyVueDirective::VueVBindShorthandDirective(sh), VueDirectiveStyle::Longhand) => {
-                if let Ok(arg) = sh.arg() {
-                    let mut builder =
-                        make::vue_directive(make::ident("v-bind"), sh.modifiers()).with_arg(arg);
-                    if let Some(init) = sh.initializer() {
-                        builder = builder.with_initializer(init);
-                    }
-                    let new_node = builder.build();
-                    mutation.replace_node(
-                        AnyVueDirective::VueVBindShorthandDirective(sh.clone()),
-                        AnyVueDirective::VueDirective(new_node),
-                    );
+                let arg = sh.arg().ok()?;
+                let mut builder =
+                    make::vue_directive(make::ident("v-bind"), sh.modifiers()).with_arg(arg);
+                if let Some(init) = sh.initializer() {
+                    builder = builder.with_initializer(init);
                 }
+                let new_node = builder.build();
+                mutation.replace_node(
+                    AnyVueDirective::VueVBindShorthandDirective(sh.clone()),
+                    AnyVueDirective::VueDirective(new_node),
+                );
                 Some(biome_analyze::RuleAction::new(
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs (3)

12-14: Consider splitting the doc comment for readability.

Same as the v-bind rule — the doc comment could be formatted across multiple lines for better readability.

Suggested format
-    /// Enforce a consistent style for `v-on` in Vue templates. Prefer either shorthand (`@event="..."`) or longhand (`v-on:event="..."`).
+    /// Enforce a consistent style for `v-on` in Vue templates.
+    ///
+    /// Prefer either shorthand (`@event="..."`) or longhand (`v-on:event="..."`).

143-158: Use .ok()? for cleaner control flow.

The nested if let Ok(inner) = arg.arg() pattern can be simplified. If arg.arg() fails, the action returns with an empty mutation.

Suggested fix
             (AnyVueDirective::VueDirective(dir), VueDirectiveStyle::Shorthand) => {
                 let modifiers = dir.modifiers();
                 let initializer = dir.initializer();
-                if let Some(arg) = dir.arg() {
-                    // Build VueVOnShorthandDirective: at_token '@' + arg + modifiers (+initializer)
-                    let at_token = HtmlSyntaxToken::new_detached(T![@], "@", [], []);
-                    if let Ok(inner) = arg.arg() {
-                        let mut builder =
-                            make::vue_v_on_shorthand_directive(at_token, inner, modifiers);
-                        if let Some(init) = initializer {
-                            builder = builder.with_initializer(init);
-                        }
-                        let new_node = builder.build();
-                        mutation.replace_node(
-                            AnyVueDirective::VueDirective(dir.clone()),
-                            AnyVueDirective::VueVOnShorthandDirective(new_node),
-                        );
-                    }
+                let arg = dir.arg()?;
+                let inner = arg.arg().ok()?;
+                // Build VueVOnShorthandDirective: at_token '@' + arg + modifiers (+initializer)
+                let at_token = HtmlSyntaxToken::new_detached(T![@], "@", [], []);
+                let mut builder =
+                    make::vue_v_on_shorthand_directive(at_token, inner, modifiers);
+                if let Some(init) = initializer {
+                    builder = builder.with_initializer(init);
                 }
+                let new_node = builder.build();
+                mutation.replace_node(
+                    AnyVueDirective::VueDirective(dir.clone()),
+                    AnyVueDirective::VueVOnShorthandDirective(new_node),
+                );
                 Some(biome_analyze::RuleAction::new(

167-184: Use .ok()? for cleaner control flow.

Same issue here — the if let Ok(any_arg) = sh.arg() pattern should use .ok()? for early return.

Suggested fix
             // Convert shorthand @event to v-on:event
             (AnyVueDirective::VueVOnShorthandDirective(sh), VueDirectiveStyle::Longhand) => {
                 let name_token = make::ident("v-on");
                 let modifiers = sh.modifiers();
                 let initializer = sh.initializer();
-                if let Ok(any_arg) = sh.arg() {
-                    // Build VueDirectiveArgument with ':' token and same inner arg
-                    let colon = HtmlSyntaxToken::new_detached(HtmlSyntaxKind::COLON, ":", [], []);
-                    let arg = make::vue_directive_argument(colon, any_arg);
-                    let mut builder = make::vue_directive(name_token, modifiers).with_arg(arg);
-                    if let Some(init) = initializer {
-                        builder = builder.with_initializer(init);
-                    }
-                    let new_node = builder.build();
-                    mutation.replace_node(
-                        AnyVueDirective::VueVOnShorthandDirective(sh.clone()),
-                        AnyVueDirective::VueDirective(new_node),
-                    );
+                let any_arg = sh.arg().ok()?;
+                // Build VueDirectiveArgument with ':' token and same inner arg
+                let colon = HtmlSyntaxToken::new_detached(HtmlSyntaxKind::COLON, ":", [], []);
+                let arg = make::vue_directive_argument(colon, any_arg);
+                let mut builder = make::vue_directive(name_token, modifiers).with_arg(arg);
+                if let Some(init) = initializer {
+                    builder = builder.with_initializer(init);
                 }
+                let new_node = builder.build();
+                mutation.replace_node(
+                    AnyVueDirective::VueVOnShorthandDirective(sh.clone()),
+                    AnyVueDirective::VueDirective(new_node),
+                );
                 Some(biome_analyze::RuleAction::new(
🧹 Nitpick comments (1)
crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs (1)

14-23: Consider extracting VueDirectiveStyle to a shared module.

The VueDirectiveStyle enum is duplicated between use_vue_consistent_v_bind_style.rs and this file. If both rules always share the same enum semantics, extracting it to a common module would reduce duplication and ensure consistency.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83be210 and 07548c6.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (19)
  • .changeset/add-v-bind-style-rule.md
  • .changeset/add-v-on-style-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.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: 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: 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/**/*.rs : Use `RuleSource::Eslint(...).same()` when implementing a rule that matches the behavior of an ESLint rule
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome 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/useVueConsistentVOnStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 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/useVueConsistentVOnStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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/useVueConsistentVOnStyle/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/useVueConsistentVOnStyle/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/**/*invalid* : Create test files prefixed with `invalid` for code that should trigger the rule

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 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-v-bind-style-rule.md
  • .changeset/add-v-on-style-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:

  • .changeset/add-v-bind-style-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-11-24T18:05:20.371Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-11-24T18:05:20.371Z
Learning: Applies to crates/biome_formatter/**/biome_*_formatter/tests/specs/**/options.json : Create an `options.json` file (formatted as `biome.json`) in test specification folders to apply non-default formatting options to all test files in that folder

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome 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/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 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_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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 try operator `?` when `run` function returns `Option` to transform `Result` into `Option`

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/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_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.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: Applies to **/*.rs : Use inline rustdoc documentation for rules, assists, and their options

Applied to files:

  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
🧬 Code graph analysis (3)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs (3)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs (3)
  • run (72-96)
  • diagnostic (98-133)
  • action (135-194)
crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs (1)
  • style (28-30)
crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs (1)
  • style (28-30)
crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs (1)
crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs (1)
  • style (28-30)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs (3)
  • run (72-96)
  • diagnostic (98-133)
  • action (135-182)
crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs (1)
  • style (28-30)
⏰ 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: Test Node.js API
  • GitHub Check: Check JS Files
  • GitHub Check: autofix
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (19)
.changeset/add-v-bind-style-rule.md (1)

1-5: LGTM!

Changelog entry is clear and follows the standard format.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json (1)

1-15: LGTM!

Test configuration correctly sets the longhand style option.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json (1)

1-15: LGTM!

Configuration correctly sets longhand style for testing invalid shorthand usage.

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

1-4: LGTM!

Valid test case correctly uses shorthand syntax with the default configuration.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json (1)

1-15: LGTM!

Test configuration correctly enables the longhand style option for v-on directives.

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

1-4: LGTM!

Valid test case correctly demonstrates shorthand v-bind syntax with the default configuration.

.changeset/add-v-on-style-rule.md (1)

1-5: LGTM!

Changelog entry accurately describes the new v-on style rule.

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

1-5: Test case correctly uses longhand v-on syntax.

The test appropriately demonstrates invalid longhand usage with the default shorthand preference. Minor observation: inconsistent indentation (tab on line 3, spaces on line 4) – likely inconsequential for this rule test, but worth noting.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue (1)

1-4: LGTM!

Test fixture correctly demonstrates valid longhand v-bind usage.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json (1)

1-15: LGTM!

Configuration correctly enables the rule with longhand style option.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue (1)

1-4: LGTM!

Test fixture correctly demonstrates that shorthand is invalid when longhand style is configured.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue (1)

1-4: LGTM!

Test fixture correctly demonstrates that shorthand @ is invalid when longhand v-on: style is configured.

crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue (1)

1-4: LGTM!

Test fixture correctly demonstrates valid longhand v-on usage.

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

1-5: LGTM!

Test fixture correctly demonstrates that longhand v-bind: is invalid when the default shorthand style is active.

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

401-402: LGTM!

Module declarations correctly expose the new Vue directive style option modules.

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

66-96: LGTM!

The run function correctly identifies v-bind directives and returns violations based on the configured style preference.

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

1-31: LGTM!

The options struct is well-structured with proper serde configuration, derives, and a sensible default. Follows the established pattern in the codebase.

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

72-96: LGTM!

The run function correctly identifies v-on directives and returns violations based on the configured style preference.


98-133: LGTM!

The diagnostic function is well-structured with clear messages and appropriate debug_assert guards for the unreachable branches.

Comment on lines +1 to +31
use biome_deserialize_macros::{Deserializable, Merge};
use serde::{Deserialize, Serialize};

#[derive(Default, Clone, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields, default)]
pub struct UseVueConsistentVBindStyleOptions {
/// Preferred style for `v-bind` usage: "shorthand" or "longhand".
/// If omitted, shorthand is preferred.
#[serde(skip_serializing_if = "Option::<_>::is_none")]
pub style: Option<VueDirectiveStyle>,
}

#[derive(
Clone, Copy, Default, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize,
)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub enum VueDirectiveStyle {
#[default]
Shorthand,
Longhand,
}

impl UseVueConsistentVBindStyleOptions {
pub const DEFAULT_STYLE: VueDirectiveStyle = VueDirectiveStyle::Shorthand;

pub fn style(&self) -> VueDirectiveStyle {
self.style.unwrap_or(Self::DEFAULT_STYLE)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add rustdoc documentation to public API.

The struct, enum, constant, and method lack rustdoc comments. Per coding guidelines, inline documentation is required for rule options.

🔎 Suggested documentation structure
+/// Options for the `useVueConsistentVBindStyle` rule.
+///
+/// Enforces consistent usage of either shorthand (`:`) or longhand (`v-bind:`) form.
 #[derive(Default, Clone, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize)]
 #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
 #[serde(rename_all = "camelCase", deny_unknown_fields, default)]
 pub struct UseVueConsistentVBindStyleOptions {
-    /// Preferred style for `v-bind` usage: "shorthand" or "longhand".
-    /// If omitted, shorthand is preferred.
+    /// Preferred style for `v-bind` directives.
+    ///
+    /// Defaults to [`VueDirectiveStyle::Shorthand`] if not specified.
     #[serde(skip_serializing_if = "Option::<_>::is_none")]
     pub style: Option<VueDirectiveStyle>,
 }
 
+/// Represents the style preference for Vue directives.
 #[derive(
     Clone, Copy, Default, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize,
 )]
 #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
 #[serde(rename_all = "camelCase")]
 pub enum VueDirectiveStyle {
+    /// Use shorthand form (`:prop` or `@event`).
     #[default]
     Shorthand,
+    /// Use longhand form (`v-bind:prop` or `v-on:event`).
     Longhand,
 }
 
 impl UseVueConsistentVBindStyleOptions {
+    /// The default directive style when none is specified.
     pub const DEFAULT_STYLE: VueDirectiveStyle = VueDirectiveStyle::Shorthand;
 
+    /// Returns the configured style, or the default if not set.
     pub fn style(&self) -> VueDirectiveStyle {
         self.style.unwrap_or(Self::DEFAULT_STYLE)
     }
 }

Based on coding guidelines.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
use biome_deserialize_macros::{Deserializable, Merge};
use serde::{Deserialize, Serialize};
#[derive(Default, Clone, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields, default)]
pub struct UseVueConsistentVBindStyleOptions {
/// Preferred style for `v-bind` usage: "shorthand" or "longhand".
/// If omitted, shorthand is preferred.
#[serde(skip_serializing_if = "Option::<_>::is_none")]
pub style: Option<VueDirectiveStyle>,
}
#[derive(
Clone, Copy, Default, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize,
)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub enum VueDirectiveStyle {
#[default]
Shorthand,
Longhand,
}
impl UseVueConsistentVBindStyleOptions {
pub const DEFAULT_STYLE: VueDirectiveStyle = VueDirectiveStyle::Shorthand;
pub fn style(&self) -> VueDirectiveStyle {
self.style.unwrap_or(Self::DEFAULT_STYLE)
}
}
use biome_deserialize_macros::{Deserializable, Merge};
use serde::{Deserialize, Serialize};
/// Options for the `useVueConsistentVBindStyle` rule.
///
/// Enforces consistent usage of either shorthand (`:`) or longhand (`v-bind:`) form.
#[derive(Default, Clone, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase", deny_unknown_fields, default)]
pub struct UseVueConsistentVBindStyleOptions {
/// Preferred style for `v-bind` directives.
///
/// Defaults to [`VueDirectiveStyle::Shorthand`] if not specified.
#[serde(skip_serializing_if = "Option::<_>::is_none")]
pub style: Option<VueDirectiveStyle>,
}
/// Represents the style preference for Vue directives.
#[derive(
Clone, Copy, Default, Debug, Deserialize, Deserializable, Merge, Eq, PartialEq, Serialize,
)]
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[serde(rename_all = "camelCase")]
pub enum VueDirectiveStyle {
/// Use shorthand form (`:prop` or `@event`).
#[default]
Shorthand,
/// Use longhand form (`v-bind:prop` or `v-on:event`).
Longhand,
}
impl UseVueConsistentVBindStyleOptions {
/// The default directive style when none is specified.
pub const DEFAULT_STYLE: VueDirectiveStyle = VueDirectiveStyle::Shorthand;
/// Returns the configured style, or the default if not set.
pub fn style(&self) -> VueDirectiveStyle {
self.style.unwrap_or(Self::DEFAULT_STYLE)
}
}
🤖 Prompt for AI Agents
In crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs around lines
1 to 31, public API items (the UseVueConsistentVBindStyleOptions struct, its
style field, the VueDirectiveStyle enum and its variants, the DEFAULT_STYLE
constant, and the style() method) lack rustdoc comments; add concise /// doc
comments for each public item: document the struct's purpose and when to
configure it, document the style field meaning and accepted values, document the
enum and each variant (Shorthand and Longhand) describing behavior, document
DEFAULT_STYLE as the built-in fallback, and document style() to state it returns
the configured style or the DEFAULT_STYLE when unset; follow project doc style
(///, brief summary sentence then optional details) and keep wording consistent
with existing rule-option docs.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 28, 2025

CodSpeed Performance Report

Merging #8586 will not alter performance

Comparing dyc3/vue-directive-style-rules (1d5df15) with main (83be210)

Summary

✅ 1 untouched
⏩ 154 skipped1

Footnotes

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

@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from 07548c6 to 0a828ea Compare December 28, 2025 21:05
@dyc3 dyc3 force-pushed the dyc3/vue-directive-style-rules branch from 0a828ea to fdbd85b Compare December 28, 2025 21:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs (1)

1-31: Add rustdoc documentation to public API.

The struct, enum, constant, and method lack comprehensive rustdoc comments. Per coding guidelines, inline documentation is required for rule options.

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

98-133: Consider consolidating the match blocks.

The message and note generation have identical match patterns. Could be combined into a single match returning a tuple, though the current approach is clear enough.

🔎 Optional consolidation
     fn diagnostic(ctx: &RuleContext<Self>, state: &Self::State) -> Option<RuleDiagnostic> {
         let prefer = ctx.options().style();
-        let message = match (state, prefer) {
+        let (message, note) = match (state, prefer) {
             (AnyVueDirective::VueDirective(_), VueDirectiveStyle::Shorthand) => {
-                markup! { "Use shorthand '@' syntax instead of 'v-on'." }
+                (
+                    markup! { "Use shorthand '@' syntax instead of 'v-on'." },
+                    markup! { "This project prefers to use shorthand syntax for v-on." },
+                )
             }
             (AnyVueDirective::VueVOnShorthandDirective(_), VueDirectiveStyle::Longhand) => {
-                markup! { "Use longhand 'v-on' syntax instead of '@'." }
+                (
+                    markup! { "Use longhand 'v-on' syntax instead of '@'." },
+                    markup! { "This project prefers to use longhand syntax for v-on." },
+                )
             }
             _ => {
                 debug_assert!(
                     false,
                     "Diagnostic should only be created for invalid states."
                 );
                 return None;
             }
         };
-        let note = match (state, prefer) {
-            (AnyVueDirective::VueDirective(_), VueDirectiveStyle::Shorthand) => {
-                markup! { "This project prefers to use shorthand syntax for v-on." }
-            }
-            (AnyVueDirective::VueVOnShorthandDirective(_), VueDirectiveStyle::Longhand) => {
-                markup! { "This project prefers to use longhand syntax for v-on." }
-            }
-            _ => {
-                debug_assert!(
-                    false,
-                    "Diagnostic should only be created for invalid states."
-                );
-                return None;
-            }
-        };
         Some(RuleDiagnostic::new(rule_category!(), state.range(), message).note(note))
     }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 07548c6 and fdbd85b.

⛔ Files ignored due to path filters (13)
  • crates/biome_configuration/src/analyzer/linter/rules.rs is excluded by !**/rules.rs and included by **
  • crates/biome_diagnostics_categories/src/categories.rs is excluded by !**/categories.rs and included by **
  • crates/biome_html_analyze/src/lint/nursery.rs is excluded by !**/nursery.rs and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
  • packages/@biomejs/biome/configuration_schema.json is excluded by !**/configuration_schema.json and included by **
📒 Files selected for processing (19)
  • .changeset/add-v-bind-style-rule.md
  • .changeset/add-v-on-style-rule.md
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue
  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.options.json
🚧 Files skipped from review as they are similar to previous changes (13)
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-invalid.vue
  • crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/invalid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-valid.options.json
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVOnStyle/longhand-valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/longhand-invalid.vue
  • .changeset/add-v-bind-style-rule.md
  • .changeset/add-v-on-style-rule.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

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

Files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
🧠 Learnings (35)
📓 Common learnings
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`
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-12-19T12:53:30.413Z
Learning: Applies to crates/biome_analyze/**/biome_rule_options/lib/**/*.rs : Wrap rule options fields in `Option<>` to properly track set and unset options during merge

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • crates/biome_rule_options/src/lib.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_rule_options/src/lib.rs
  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome 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/useVueConsistentVBindStyle/valid.vue
  • crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/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/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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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 try operator `?` when `run` function returns `Option` to transform `Result` into `Option`

Applied to files:

  • crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs
  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_on_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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_consistent_v_bind_style.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: Applies to **/*.rs : Use inline rustdoc documentation for rules, assists, and their options

Applied to files:

  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome PR: 0
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 rule option must have its own h3 header with description, default value, options block, and code example

Applied to files:

  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.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: Applies to **/*.rs : Use doc tests (doctest) format with code blocks in rustdoc comments; ensure assertions pass in tests

Applied to files:

  • crates/biome_rule_options/src/use_vue_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/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_consistent_v_bind_style.rs
📚 Learning: 2025-12-19T12:53:30.413Z
Learnt from: CR
Repo: biomejs/biome 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/useVueConsistentVBindStyle/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/useVueConsistentVBindStyle/invalid.vue
🧬 Code graph analysis (1)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_on_style.rs (2)
crates/biome_html_analyze/src/lint/nursery/use_vue_consistent_v_bind_style.rs (3)
  • run (72-96)
  • diagnostic (98-133)
  • action (135-180)
crates/biome_rule_options/src/use_vue_consistent_v_on_style.rs (1)
  • style (28-30)
⏰ 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). (9)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test Node.js API
  • GitHub Check: Check JS Files
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (6)
crates/biome_html_analyze/tests/specs/nursery/useVueConsistentVBindStyle/valid.vue (1)

1-4: LGTM!

Clean and correct test case for the default shorthand style. The comment and structure follow conventions.

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

1-5: LGTM!

Good coverage with two test cases for the invalid longhand usage. The mixed indentation (tab on line 3, spaces on line 4) might be intentional for testing purposes.

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

401-402: LGTM!

Module declarations are correctly placed in alphabetical order among the other Vue rules.

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

12-64: LGTM!

Rule declaration follows conventions with proper metadata, documentation, and examples. The version: "next" and source attribution are correctly set.


72-96: LGTM!

Clean implementation using the ok()? pattern as recommended. The matching logic correctly identifies style violations.


135-190: LGTM!

The action function correctly handles both conversion directions. The asymmetric dir.arg()?.arg().ok()? vs sh.arg().ok()? reflects the different AST structures for longhand (with VueDirectiveArgument wrapper) versus shorthand forms.

Copy link
Contributor Author

dyc3 commented Dec 28, 2025

Merge activity

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

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants