tomblachut / svelte-intellij

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

'}' expected, got '===' #104

Closed theword closed 4 years ago

theword commented 4 years ago

First of all, thank you for your great work.

I am using webstorm and I have this piece of code written which I believe is valid. It runs and works correctly.

{#if players.length === 0}

No Players

{/if}

However, Webstorm yells at me saying " '}' expected, got '===' instead. "

ISSUE SOLVED: Old version of software.

tomblachut commented 4 years ago

Can I assume that your snipped was in fact

<script>
    let players = [];
</script>

{#if players.length === 0}
    No Players
{/if}

?

theword commented 4 years ago

Yes, that is correct. I should of been more clear.

korywka commented 4 years ago

image

no lint errors

theword commented 4 years ago

Lint

Hmm maybe, something else is going on for me then...

korywka commented 4 years ago

@theword try the same minimal example you posted here (and on my screenshot). And check if you are using the latest version of plugin 🤷‍♂

tomblachut commented 4 years ago

@theword This looks like a really old version of the plugin (attribute expressions aren't parsed). Please update to the latest version and it should work.

On the off chance that you'll using WS version prior to 2019.2 unfortunately I cannot help you, because JB changed some APIs.

I've checked it myself now and got the same result as @bravecow

theword commented 4 years ago

Ok yeah, that was it. I was on an earlier version of WS and it installed version 0.8.0. Having updated to 2019.3 now and getting version 0.12.0. The issue is now gone. Thanks for the great software!

tomblachut commented 4 years ago

Cheers