You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v-bind same name shorthand was added in Vue 3.4 and is supported since #2355/#2357. A new rule (e.g. vue/v-bind-same-name-style) or a new option of the existing vue/v-bind-style rule should be added that allows always enforcing that shorthand where possible, or always disallow it.
What category should the rule belong to?
[x] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
I’d be happy to help out with this one!
And I've noticed that the AST structure generated by both ways seems to be the same, as per the eslint-vue-parser. It looks like we can't differentiate them just by checking the directive.value.
Would love to get some insights on how we might tell them apart and get it working. Any thoughts?
Please describe what the rule should do:
v-bind
same name shorthand was added in Vue 3.4 and is supported since #2355/#2357. A new rule (e.g.vue/v-bind-same-name-style
) or a new option of the existingvue/v-bind-style
rule should be added that allows always enforcing that shorthand where possible, or always disallow it.What category should the rule belong to?
[x] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
"sameNameShorthand": "always"
"sameNameShorthand": "never"
Additional context:
v-bind
same name shorthand #2355The text was updated successfully, but these errors were encountered: