# vue/no-invalid-model-keys
require valid keys in model option
- ⚠️ This rule was deprecated and replaced by vue/valid-model-definition rule.
# 📖 Rule Details
This rule is aimed at preventing invalid keys in model option.
<script>
/* ✓ GOOD */
export default {
model: {
prop: 'list',
}
}
</script>
<script>
/* ✓ GOOD */
export default {
model: {
event: 'update'
}
}
</script>
<script>
/* ✓ GOOD */
export default {
model: {
prop: 'list',
event: 'update'
}
}
</script>
<script>
/* ✗ BAD */
export default {
model: {
prop: 'list',
events: 'update'
}
}
</script>
<script>
/* ✗ BAD */
export default {
model: {
props: 'list',
events: 'update'
}
}
</script>
<script>
/* ✗ BAD */
export default {
model: {
name: 'checked',
props: 'list',
event: 'update'
}
}
</script>
# 🚀 Version
This rule was introduced in eslint-plugin-vue v7.9.0