tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Regressions in #100 unused store variable #116

Closed shirotech closed 4 years ago

shirotech commented 4 years ago

Sorry for reporting something that is in progress, but hopefully this may be helpful to you, in any case here it is. This is in regards to #100

When a store is derived from a destructor and used with $ prefix, it doesn't seem to register it as being "used".

Before:

Screen Shot 2020-05-09 at 11 29 44 am

After:

Screen Shot 2020-05-09 at 11 27 44 am

Also keep up the great work, very promising plugin. 👍

tomblachut commented 4 years ago

Sorry for reporting something that is in progress

This is helpful, don't hesitate next time :)

I don't really know what is happening yet. Store references was never programmed to be registered as used yet, "before" behavior looks like as a side effect.

Can you paste this code here as text?

shirotech commented 4 years ago

@tomblachut If that is the case I guess bug exists in "before" (master 90fb24f1)

What is happening I think is everything has been treated as "used", I've created a fresh new empty project to make sure there are no side effects e.g. referencing same variable names in other files.

This can be observed below: Screen Shot 2020-05-10 at 1 00 38 am

Note that this is not the behaviour we want as opposed to a normal js file: Screen Shot 2020-05-10 at 1 01 33 am

After applying #100 (47eb7515) this has been resolved: Screen Shot 2020-05-10 at 1 02 43 am

Please feel free to close this, as I think once #100 has been merged, the "used" bug will resolve.