Skip to content
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

Error when destructing local const #186

Closed
DanielRios549 opened this issue Aug 15, 2022 · 1 comment
Closed

Error when destructing local const #186

DanielRios549 opened this issue Aug 15, 2022 · 1 comment

Comments

@DanielRios549
Copy link

ESLint shows errors when destructing an object in a local variable @const, the code works well apart from those errors.

Example:

{#if object}
{@const { property1 } = object}
{/if}

1º Problem - ESLint show the error:
'property1' is not defined (no-undef error).

2º Problem - If the property was equal to name, ESLint show the error:
Read-only global 'name' should not be modified (no-global-assign error)

Images:

image

image

@DanielRios549 DanielRios549 changed the title Error on destructing local const Error when destructing local const Aug 15, 2022
@DanielRios549
Copy link
Author

I found the solution: update the eslint-plugin-svelte3 package, I was using version 3.4.0, and the update to 4.0.0 fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant