stylelint-prettier
stylelint-prettier copied to clipboard
stylelint-prettier doesn't fix problems at the same time as removing empty extra lines
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"
}
Happens to me too, when using stylelint-prettier/recommended and stylelint-config-clean-order
I have to run stylelint twice to make it work
same
The problem is broader - any change in the code by the prettier prevents other errors from being fixed
Thanks for the fix @dartess. I've published 5.0.1 which contains your fix.