Skip to content

Commit 16e9173

Browse files
committed
docs(useVueValidVBind): link to Vue same-name shorthand reference
Per review feedback, point the rule docstring and the `is_static_arg` helper at the official Vue template-syntax page that documents the 3.4+ same-name shorthand.
1 parent 726fbd5 commit 16e9173

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/biome_html_analyze/src/lint/correctness/use_vue_valid_v_bind.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ declare_lint_rule! {
1616
/// - The directive has neither a value nor a static argument from which to
1717
/// derive one. E.g. `<div v-bind></div>` or `<div v-bind:[foo]></div>`.
1818
/// `v-bind:foo` and `:foo` are accepted because they are valid Vue 3.4+
19-
/// same-name shorthand for `:foo="foo"`.
19+
/// [same-name shorthand](https://vuejs.org/guide/essentials/template-syntax.html#same-name-shorthand)
20+
/// for `:foo="foo"`.
2021
/// - The directive has invalid modifiers. E.g. `<div v-bind:aaa.bbb="ccc"></div>`
2122
///
2223
/// ## Examples
@@ -150,6 +151,8 @@ fn find_invalid_modifiers(modifiers: &VueModifierList) -> Option<TextRange> {
150151
/// (e.g. `foo` in `:foo`), as opposed to a dynamic expression
151152
/// (e.g. `[foo]` in `:[foo]`). Only static arguments can be the
152153
/// source of a Vue 3.4+ same-name shorthand binding.
154+
///
155+
/// See <https://vuejs.org/guide/essentials/template-syntax.html#same-name-shorthand>.
153156
fn is_static_arg(arg: &VueDirectiveArgument) -> bool {
154157
matches!(
155158
arg.arg().ok(),

0 commit comments

Comments
 (0)