jamesbirtles / svelte-vscode

Svelte language support for VS Code
https://marketplace.visualstudio.com/items?itemName=JamesBirtles.svelte-vscode
MIT License
209 stars 23 forks source link

Expected an assignment or function call and instead saw an expression, but it's legal #115

Closed frederikhors closed 4 years ago

frederikhors commented 4 years ago

Using this:

let canRender

$: canRender, console.log('HI')

is perfectly fine and it works.

But I get an error:

image

Expected an assignment or function call and instead saw an expression (eslint, no-unused-expressions)

Why?

jasonlyu123 commented 4 years ago

This is because the canRender expression causing eslint to report linting error.