Motivation
It is useful and a better code (by dev's choice) to point out when a $bindable prop is not being used as bindable in the parent consumer.
Description
The rule will enforce the use of a prop as $bindable in the parent, if it is defined as such. Otherwise the exception should be explicitly set with eslint-disable-next-line (or similar).
Examples
<!-- Child -->
<script lang="ts">
interface Props {
value: number;
}
let { value = $bindable(0) }: Props = $props();
</script>
<button onclick={() => value++}>Increment</button>
The value is {value}
<!-- Parent -->
<script>
let value = $state(0);
</script>
<!-- ✓ GOOD -->
<Child bind:value />
<!-- ✗ BAD -->
<Child {value} />
Motivation
It is useful and a better code (by dev's choice) to point out when a
$bindableprop is not being used as bindable in the parent consumer.Description
The rule will enforce the use of a prop as
$bindablein the parent, if it is defined as such. Otherwise the exception should be explicitly set witheslint-disable-next-line(or similar).Examples