vue/no-custom-modifiers-on-v-model
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-custom-modifiers-on-v-model": "error",
},
},
];Disallow custom modifiers on v-model used on the component
<MyComponent v-model.aaa="foo" />
<MyComponent v-model.aaa.bbb="foo" />
</template><MyComponent v-model="foo" />
<MyComponent v-model.trim="foo" />
<MyComponent v-model.lazy="foo" />
<MyComponent v-model.number="foo" />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/no-custom-modifiers-on-v-model
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/no-custom-modifiers-on-v-model": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce inheritAttrs to be set to false when using v-bind="$attrs"
Enforce new lines between multi-line properties in Vue components
Disallow duplication of class names in class attributes