tomblachut / svelte-intellij

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

Component imports are being incorrectly marked as unused #114

Closed asm0dey closed 4 years ago

asm0dey commented 4 years ago

Consider the following snippet:

<script>
    import { Button, Col, Row } from 'sveltestrap';
</script>

<Row>
    <Col>
        <Button color="primary" outline>Hello World!</Button>
    </Col>
</Row>

In this example the whole import line is marked as unused while being obviously used

IntelliJ IDEA 2020.1.1 (Ultimate Edition)
Build #IU-201.7223.91, built on April 30, 2020
Licensed to JetBrains Team / Pasha Finkelshteyn
Subscription is active until December 10, 2020
Runtime version: 11.0.6+8-b765.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.5.19-1-manjaro
GC: ParNew, ConcurrentMarkSweep
Memory: 3987M
Cores: 16
Non-Bundled Plugins: com.jetbrains.upsource, com.github.jk1.ytplugin, com.perl5, woaini.liquibase.plugin, com.markskelton.one-dark-theme, org.intellij.scala, org.jetbrains.kotlin, izhangzhihao.rainbow.brackets, com.codota.csp.intellij, kotlintest-plugin-intellij, org.jetbrains.debugger.streams.kotlin, org.jetbrains.plugins.vue, dev.blachut.svelte.lang, lermitage.intellij.extra.icons
Current Desktop: KDE
tomblachut commented 4 years ago

Ah yes, re-exports don't work yet

Duplicates #48

asm0dey commented 4 years ago

Why is it reexport?

tomblachut commented 4 years ago

Svelte compiles to default exports, which are recognized, but e.g. in case of npm libraries you usually want to create one module which re-exports everything else, like in case of sveltestrap

ma13gagan commented 1 year ago

It's still not working for me. I am using WebStorm 2023.2.2 and plugin version 232.9921.36. IDE is still marking reexport imports as unused.

image

nekogochan commented 9 months ago

idea is f*cked in last time like s*it. Got problem like this too.

idea version: Build #IU-232.10227.8, built on November 9, 2023

plugin version: 232.9921.36

image

image

tomblachut commented 9 months ago

Hello! Please follow the ticket on YouTrack for that specific problem: WEB-63156 Svelte: namespaced component imports are marked as unused