In committed code, prop definitions should always be as detailed as possible, specifying at least type(s).
This rule enforces that a props
statement contains type definition.
👎 Examples of incorrect code for this rule:
export default {
props: ['status']
}
👍 Examples of correct code for this rule:
export default {
props: {
status: String
}
}
export default {
props: {
status: {
type: String,
required: true,
validate: function (value) {
return ['syncing', 'synced', 'version-conflict', 'error'].indexOf(value) !== -1
}
}
}
}
Nothing.