prettier / stylelint-prettier

Stylelint plugin for Prettier formatting
MIT License
344 stars 20 forks source link

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

Open dmitriybo opened 2 months ago

dmitriybo commented 2 months ago

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"
}
Sergiobop commented 1 month ago

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

I have to run stylelint twice to make it work

nitzcard commented 3 weeks ago

same

dartess commented 1 week ago

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