-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[prefer-destructured-store-props]: Allow methods? #912
Comments
Would it be possible to have a repro or an example? |
Here you go :) |
Hmm. I'm not sure if the user needs to wrap a SvelteMap in a store 🤔. I don't think the rule is currently giving a false positive. |
Honestly, I don't know -> sveltejs/svelte#14376 |
Ok, I resolved the linked discussion and you should indeed not use However, I am thinking my original issue still stands - the |
Can you share some example code? |
Hmm, I tried putting a class inside a store, but that doesn't really make sense as anything the class returns from its methods won't be reactive... So this probably isn't useful after all, sorry! |
Description
Hi,
I have a reactive map in a store (its a SvelteMap) and I am not really sure that's the correct way to do this. However, that's a little off topic. The thing is, the
prefer-destructured-store-props
rule is complaining when I use theget()
method and I think that's a false positive?It seems to me like methods should be allowed without destructuring. I am not an expert in reactivity in svelte, so I am not sure, though... What do you think?
The text was updated successfully, but these errors were encountered: