webstorm-styled-components icon indicating copy to clipboard operation
webstorm-styled-components copied to clipboard

Selector is never used

Open neosa opened this issue 2 years ago • 8 comments

  • WebStorm 2023.3.2
  • Styled-components plugin version: 233.13135.92

Problem description:

I noticed a problem after updating to the latest version of Webstorm when I want to write the class some_class, for example, into the Wrapper wrapper. Webstorm shows that this class has never been used, but this is not true.

WebStorm highlights only regular tags in the style h1-h5, p, ul, etc.

const Wrapper = styled.div` // h3 is highlighted by the editor h3 { color: #242628; font-size: 20px; font-weight: 700; line-height: 140%; }

     // Selector some_class is never used
.some_class {
	margin-top: 20px;
}

`

image

neosa avatar Dec 30 '23 12:12 neosa

Same here. Also doesn't parse custom properties. Marks all of them as invalid and says "Cannot resolve '{customProperty}' custom property"

anjeypakulnevich avatar Jan 03 '24 15:01 anjeypakulnevich

Any updates? Extension simply doesn't work for latest webstorm :(

anjeypakulnevich avatar Jun 25 '24 11:06 anjeypakulnevich

@jqyp @YannCebron @develar apologies for pinging you directly, but we just wanted to know whether this issue could get any attention anytime soon. If not, can you give me any hints on how to debug it and/or fix it?

I'm not specifically a Kotlin programmer, but I'm determined to fix this with your guidance.

piotrd avatar Aug 07 '24 14:08 piotrd

Will ping the WS team on that.

YannCebron avatar Aug 07 '24 15:08 YannCebron

This feature is in the final stages of testing and will be available in 2024.2.1 (WEB-65204 Unused CSS selector - false positives using TSX and styled-components)

Vorobey31415 avatar Aug 12 '24 14:08 Vorobey31415