The reserved names of Vue should not be used as prop names
- VUE_RESERVED_NAME_IN_PROPS
- Error
- Medium
- vue
This rule applies when the reserved names of Vue are used as prop names.
The following names are reserved in Vue:
keyref- Names starting with
$
If props are defined with these names, Vue ignores them and outputs a warning message.
Note: This rule is based on Vue 3.x API specifications.
Noncompliant Code Example
View with compliant examples side by side<script>
export default {
props: {
key: { // VUE_RESERVED_NAME_IN_PROPS alarm because 'key' is a reserved name in Vue.
type: String
}
}
}
</script>Compliant Code Example
View with noncompliant examples side by side<script>
export default {
props: {
keyProp: {
type: String
}
}
}
</script>Version
This rule was introduced in DeepScan 1.72.0.
See
[Vue warn]: Invalid prop name: "key" is a reserved property.