We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
vue/require-default-prop
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This rule aims to ensure that any non-required prop declaration of a component has a corresponding default value.
prop
default
[ ] Enforces code style [x] Warns about a potential error [ ] Suggests an alternate way of doing something [ ] Other (please specify:)
[ ]
[x]
Provide 2-3 code examples that this rule will warn about:
export default { props: { foo: { type: String } } }
export default { props: { foo: { type: Array, required: false } } }
based on conversation from: #117 (comment)
The text was updated successfully, but these errors were encountered:
I'll pick this
Sorry, something went wrong.
71929fa
Just trying to understand this rule. Why does this code:
props: { id: 0 }
generate an error? Isn't a literal value for a prop the same as a default value?
michalsnik
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Please describe what the rule should do:
This rule aims to ensure that any non-required
prop
declaration of a component has a correspondingdefault
value.What category of rule is this? (place an "X" next to just one item)
[ ]
Enforces code style[x]
Warns about a potential error[ ]
Suggests an alternate way of doing something[ ]
Other (please specify:)Provide 2-3 code examples that this rule will warn about:
based on conversation from: #117 (comment)
The text was updated successfully, but these errors were encountered: