You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Props can be referenced in the template using propName or props.propName. Former is convenient; latter is more explicit, provides a clear delineation between local state and props and is consistent with how props are accessed in script. Former could also feel counter-intuitive if you're using Typescript (but that's subjective).
The rule, when enabled, should flag any occurrence of implicit prop access in the template.
What category should the rule belong to?
Enforces code style (layout)
Warns about a potential error (problem)
Suggests an alternate way of doing something (suggestion)
Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
I tried to look for existing rules and proposals but couldn't find anything on this subject. If this is already possible, please let me know. Thank you.
The text was updated successfully, but these errors were encountered:
I'd go even a step further and customize the option to enforce props. as prefix or disallow it. That way, people can choose if they want the overhead but have clear indication of a prop in the template or the simplicity instead.
Please describe what the rule should do:
Props can be referenced in the template using
propName
orprops.propName
. Former is convenient; latter is more explicit, provides a clear delineation between local state and props and is consistent with how props are accessed inscript
. Former could also feel counter-intuitive if you're using Typescript (but that's subjective).The rule, when enabled, should flag any occurrence of implicit prop access in the template.
What category should the rule belong to?
Provide 2-3 code examples that this rule should warn about:
Additional context
I tried to look for existing rules and proposals but couldn't find anything on this subject. If this is already possible, please let me know. Thank you.
The text was updated successfully, but these errors were encountered: