-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
It seems like there is some issue with variables being wrongly labeled as "unused" when their value is modified in an inline handler on a DOM node.
Minimal Example:
<script>
let test = 0;
function action() {
console.log(test);
}
</script>
<div>
<div on:click={()=>test=1}></div>
<div on:click={action}></div>)
</div>
Output:
Error: 'test' is assigned a value but never used
Used versions:
"devDependencies": {
"eslint": "^7.2.0",
"eslint-plugin-jsdoc": "^27.0.7",
"eslint-plugin-svelte3": "^2.7.3",
"svelte": "^3.23.2"
}
Seems like no matter what happens in the <script> part, 'test' is always detected as unused.
rosslh and nroberson
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working