hudochenkov / postcss-styled-syntax

PostCSS syntax for CSS-in-JS like styled-components
MIT License
74 stars 4 forks source link

Rule possibly only checked within a block #10

Closed ghost closed 1 year ago

ghost commented 1 year ago

I conjecture that (some?) rules are only checked within blocks.

For example, I would expect the rule shorthand-property-no-redundant-values to catch on the following, since padding: 10px; is the shorter way to write it, but it doesn't flag.

const MyComponent = styled.div`
  padding: 10px 10px 10px 10px;
`

But the rule does correctly flag this:

const MyComponent = styled.div`
  & {
    padding: 10px 10px 10px 10px; 
  }
`
ghost commented 1 year ago

Hmmm, just upgraded to stlyelint v15, and this is no longer an issue. Thanks for the quick turnaround...