nextui-org/tailwind-variants

Webstorm (intelisense) seems to not work correctly with variants and slots

Willienn opened this issue · 1 comments

Describe the bug
Webstorm (intelisense) sometimes warn about "code duplicate?" when isn't the case.
(My webstorm is with the default settings aside of the theme and plugins)

To Reproduce
When using variants:
Just add a variant that overwrite the value of base

When use slots:
Just add a slot that contain the style of another slots. Its not always the case, like its warning about aspect-square but not for bg-red-500

Expected behavior
Dont warn about i

Screenshots

Screenshot 1
Screenshot 2024-04-23 at 10 51 08

Screenshot 2
Screenshot 2024-04-23 at 10 58 22

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.4.1
  • Browser Thorium
  • Version 21.0.6167.204 (Official Build) (x86_64)

Additional context
My classRegex:

"classRegex": [
      "tv\\(([^)(]*(?:\\([^)(]*(?:\\([^)(]*(?:\\([^)(]*\\)[^)(]*)*\\)[^)(]*)*\\)[^)(]*)*)\\)",
      "\"(.*?)\""
    ]

@Willienn This seems to be a bug with WebStorm, not tailwind variants. I would recommend opening an issue with them about how to ignore or instruct WebStorm that tv uses tailwind merge under the hood.