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
Please describe what the rule should do:
This is similar to #2172 but I would like to allow the use of implicit props and would like to warn/error when a variable shadowing a prop is defined.
<scriptsetuplang="ts">import {computed} from'vue';const props =defineProps<{ isDisabled:boolean }>();// Creating variables with the same name as props // creates an ambiguity in the templateconst isDisabled =computed(() =>props.isDisabled?'yes':'no'));</script>
<template>
<!-- Is this `isDisabled.value` or `props.isDisabled` ? -->
<h1>Disabled: {{ isDisabled }}</h1>
</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:
Additional context
It might be worthwhile to abstract #2172 and this proposal into a rule that can support either with options as they do seem fairly closely related.
The text was updated successfully, but these errors were encountered:
Please describe what the rule should do:
This is similar to #2172 but I would like to allow the use of implicit props and would like to warn/error when a variable shadowing a prop is defined.
What category should the rule belong to?
Provide 2-3 code examples that this rule should warn about:
Additional context
It might be worthwhile to abstract #2172 and this proposal into a rule that can support either with options as they do seem fairly closely related.
The text was updated successfully, but these errors were encountered: