sveltejs / eslint-plugin-svelte

ESLint plugin for Svelte using AST
https://sveltejs.github.io/eslint-plugin-svelte/
MIT License
276 stars 29 forks source link

Bindable props are treated as unused variables by eslint in some cases. #768

Closed ptrxyz closed 3 weeks ago

ptrxyz commented 3 weeks ago

Since this came up today and Thomas G. Lopes mentioned the possibility of having the issue handled by Svelte's eslint plugin I want to cross post the issue https://github.com/sveltejs/svelte/issues/11901 here:

When creating a component like this:

image

The prop is treated as unread variable yet it should rather be treated as an exported variable since it might still be read from outside.

ota-meshi commented 3 weeks ago

Thank you for posting the issue! I think we need to fix the parser. But I don't have time to do that right now.