postcss-styled-syntax icon indicating copy to clipboard operation
postcss-styled-syntax copied to clipboard

Auto fix is not working with interpolation (${(props) ... })

Open DaShuTz opened this issue 8 months ago • 4 comments

When the interpolation (${(props) ... }) in code, auto fix is not working, but the error message is still displayed.

Image

DaShuTz avatar May 26 '25 11:05 DaShuTz

vs code settings: Image

DaShuTz avatar May 26 '25 11:05 DaShuTz

  1. Correct repository for the Stylelint plugin is: https://github.com/hudochenkov/stylelint-order
  2. That's expected behavior: sometime it's not possible to safely reorder properties, so fix can't not be run, which means violation would be reported as it is still in the code. There are plans to allow sorting when it's safe to do.

hudochenkov avatar May 26 '25 16:05 hudochenkov

  1. I'm using stylelint-config-recess-order to order styled-component css code.
  2. stylelint-order is not working for this

DaShuTz avatar May 27 '25 06:05 DaShuTz

  1. Correct repository for the Stylelint plugin is: https://github.com/hudochenkov/stylelint-order
  2. That's expected behavior: sometime it's not possible to safely reorder properties, so fix can't not be run, which means violation would be reported as it is still in the code. There are plans to allow sorting when it's safe to do.

Wishing you good luck

DaShuTz avatar May 27 '25 06:05 DaShuTz