-
-
Notifications
You must be signed in to change notification settings - Fork 681
Rule Proposal: vue/require-valid-default-prop
#117
New issue
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
Comments
I don't think that name for this rule is ok, we should find out something more accurate. |
@michalsnik what do you think about this? can i start working on this? |
I'm thinking maybe we should add |
@michalsnik we should distinct both of rules,
|
good |
Please describe what the rule should do:
Enforces prop default values to be valid. In vue we have 2 ways to define
default
prop value:Literal value is not is not valid when type is specified and set to Array or Object
This rule should also check type of literal values and determine if types match.
When variable is passed as default we should omit checking
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:)Valid:
Invalid:
see more at: https://vuejs.org/v2/guide/components.html#Prop-Validation
The text was updated successfully, but these errors were encountered: