stylelint-prettier icon indicating copy to clipboard operation
stylelint-prettier copied to clipboard

stylelint-prettier doesn't fix problems at the same time as removing empty extra lines

Open dmitriybo opened this issue 1 year ago • 3 comments

Here is a minimal reproducible demo:

a {
  width: 0px; /* -> length-zero-no-unit problem; not autofixed */
}
  /* -> prettier/prettier problem; autofixed */
// .stylelintrc.json
{
  "plugins": ["stylelint-prettier"],
  "rules": {
    "length-zero-no-unit": true,
    "prettier/prettier": true
  }
}

What version of stylelint, prettier and stylelint-prettier are you using?

{
  "stylelint": "16.4.0",
  "stylelint-prettier": "5.0.0",
  "prettier": "3.2.5"
}

dmitriybo avatar Apr 30 '24 14:04 dmitriybo

Happens to me too, when using stylelint-prettier/recommended and stylelint-config-clean-order

I have to run stylelint twice to make it work

Sergiobop avatar May 18 '24 10:05 Sergiobop

same

nitzcard avatar Jun 16 '24 09:06 nitzcard

The problem is broader - any change in the code by the prettier prevents other errors from being fixed

dartess avatar Jun 28 '24 12:06 dartess

Thanks for the fix @dartess. I've published 5.0.1 which contains your fix.

BPScott avatar Jul 13 '24 23:07 BPScott