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

Falsy hint (unused var) when using style:property directive (only with TS and new transformation) #1626

Closed
ZerdoX-x opened this issue Sep 9, 2022 · 0 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@ZerdoX-x
Copy link
Contributor

ZerdoX-x commented Sep 9, 2022

Describe the bug

If I understand correctly, svelte language server doesn't take style:property="{variable}" for variable usage.
Bug exists with new transformation also (#1352).

Reproduction

repo link will be here soon

<script lang="ts">
    let clientWidth = 0;
</script>

<div bind:clientWidth style:--element-width="{clientWidth}px"></div>

clientWidth here becomes unused variable when it's actually used.

Expected behaviour

Variable should not be marked as unused.

System Info

  • OS: Macos ventura 13.0
  • IDE: VS Code 1.71.0, Svelte for VS Code 105.22.1

Which package is the issue about?

svelte-language-server

Additional Information, eg. Screenshots

No response

@ZerdoX-x ZerdoX-x added the bug Something isn't working label Sep 9, 2022
@ZerdoX-x ZerdoX-x changed the title Falsy hint (unused var) when using style:property directive Falsy hint (unused var) when using style:property directive (with TS only) Sep 9, 2022
@ZerdoX-x ZerdoX-x changed the title Falsy hint (unused var) when using style:property directive (with TS only) Falsy hint (unused var) when using style:property directive (only with TS and new transformation) Sep 9, 2022
dummdidumm added a commit to dummdidumm/language-tools that referenced this issue Sep 13, 2022
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

2 participants