unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
5.21k stars 305 forks source link

[Bug]: TooltipContent: Missing Required Attribute Warnings in IntelliJ IDEA #863

Open SAntoineS opened 1 week ago

SAntoineS commented 1 week ago

Reproduction

Can't really have a reproduction

Describe the bug

Hi, I wanted to report a minor issue that I encountered while working with the TooltipContent component.

Description

When using the TooltipContent component from shadcn-vue, IntelliJ IDEA 2024.2.4 (Ultimate Edition) displays 9 warnings for missing required attributes, even though the component functions correctly without explicitly setting these attributes.

Warnings:

warn

Steps to Reproduce:

  1. Use the TooltipContent component in a Vue project.
  2. Open the project in IntelliJ IDEA 2024.2.4 (Ultimate Edition).
  3. Observe the warnings related to missing attributes.

Expected Behavior:

No warnings should be shown if these attributes are optional and have default values handled internally by the component.

Actual Behavior:

Warnings are displayed for missing required attributes.

Additional Information:

Is there a way to configure IntelliJ IDEA to avoid these warnings, or should the component's TypeScript definitions be updated to reflect the optional nature of these attributes?

Environment:

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1345U
    Memory: 16.57 GB / 31.64 GB
  Binaries:
    Node: 20.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.98)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    @vueuse/core: ^11.0.3 => 11.2.0
    radix-vue: ^1.9.5 => 1.9.8
    vue: ^3.5.4 => 3.5.12

Contributes

sadeghbarati commented 1 week ago

@SAntoineS Never used other IDEs for Vue but VSCode

Here is my current setup for Vue