microsoft / typescript-styled-plugin

TypeScript server plugin that adds intellisense to styled component css strings
MIT License
839 stars 58 forks source link

False positive identifier expected pseudo selector on interpolated class names #105

Closed brandonkal closed 1 year ago

brandonkal commented 5 years ago

Take this css:

const rateDisabled = css`
  .${rateCls}:not(&) .${star}:hover ~ .${star} {
/* ^ ident expected   ^ ident expected */
    color: ${starWhite};
  }
`

The types of rateCls and star are strings. This plugin throws these false positives as it doesn't understand there is a string between the period and the :not().

Also, there should be some way to ignore these errors, just as we can // @ts-ignore when Typescript itself makes bad inferences.

mjbvz commented 1 year ago

Closing as this package has been deprecated in favor of the official styled-components/typescript-styled-plugin fork

After updating to that fork, follow up in the styled-components repo if this is still an issue