vue/valid-v-bind-sync
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-v-bind-sync": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
<MyComponent v-bind:aaa.sync="foo + bar" />
<MyComponent :aaa.sync="foo + bar" />
<MyComponent :aaa.sync="a?.b.c" />
<MyComponent :aaa.sync="(a?.b).c" />
<input v-bind:aaa.sync="foo" />
<input :aaa.sync="foo" />
<div v-for="todo in todos">
<MyComponent v-bind:aaa.sync="todo" />
<MyComponent :aaa.sync="todo" />
</div>
</template><MyComponent v-bind:aaa.sync="foo" />
<MyComponent :aaa.sync="foo" />
<div v-for="todo in todos">
<MyComponent v-bind:aaa.sync="todo.name" />
<MyComponent :aaa.sync="todo.name" />
</div>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/valid-v-bind-sync
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/valid-v-bind-sync": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Require key attribute for conditionally rendered repeated components
Enforce sort-keys in a manner that is compatible with order-in-components