Skip to content

vscode pug lint: All imports in import declaration are unused #958

@basaran

Description

@basaran

Describe the bug
When using pug template, linter is providing false notification on imports

To Reproduce

<script>
import {Accordion, AccordionItem} from 'carbon-components-svelte';
import {
    ContextMenu,
    ContextMenuDivider,
    ContextMenuGroup,
    ContextMenuOption,
} from 'carbon-components-svelte';
import CopyFile16 from 'carbon-icons-svelte/lib/CopyFile16';
import Cut16 from 'carbon-icons-svelte/lib/Cut16';
</script>

<template lang="pug">
main
    Accordion
        AccordionItem(title='Section 5') Content 1
        AccordionItem(title='Section 12') Content 2
        AccordionItem(title='Section 3') Content 3

    ContextMenu
        ContextMenuOption(
            icon='{CopyFile16}',
            indented,
            labelText='Copy',
            shortcutText='⌘C')
        ContextMenuOption(
            icon='{Cut16}',
            indented,
            labelText='Cut',
            shortcutText='⌘X')
        ContextMenuDivider
        ContextMenuOption(indented, kind='danger', labelText='Delete')
</template>

Expected behavior
Imported components are used and there should be no linting issues.

Screenshots

image

image

System (please complete the following information):

  • OS: Winows
  • IDE: VsCode
  • Plugin/Package: Svelte for VSCode

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions