Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
10.0.1
What version of eslint-plugin-svelte are you using?
3.15.0
What did you do?
A $bindable prop, which is modified, but not read will cause the eslint error no-useless-assignment which is included in eslint's recommended (default) ruleset as of eslint v10. The value could be read in a parent component, but eslint doesn't see this.
What did you expect to happen?
no eslint error for correct svelte code
What actually happened?
error This assigned value is not used in subsequent statements no-useless-assignment
Link to GitHub Repo with Minimal Reproducible Example
<script lang="ts">
let { count = $bindable() }: { count: number } = $props();
function onclick() {
count = 0;
}
</script>
<button {onclick}>Reset</button>
Additional comments
No response
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
10.0.1
What version of
eslint-plugin-svelteare you using?3.15.0
What did you do?
A $bindable prop, which is modified, but not read will cause the eslint error
no-useless-assignmentwhich is included in eslint's recommended (default) ruleset as of eslint v10. The value could be read in a parent component, but eslint doesn't see this.What did you expect to happen?
no eslint error for correct svelte code
What actually happened?
error This assigned value is not used in subsequent statements no-useless-assignmentLink to GitHub Repo with Minimal Reproducible Example
Additional comments
No response