Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dmitriybo opened this issue Apr 30, 2024 · 4 comments · Fixed by #360
Closed

Comments

@dmitriybo
Copy link

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
Copy link

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
Copy link

same

@dartess
Copy link
Contributor

dartess commented Jun 28, 2024

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

dartess added a commit to dartess/stylelint-prettier that referenced this issue Jul 1, 2024
BPScott pushed a commit that referenced this issue Jul 13, 2024
* add tests for --fix option

* fix issue #354
@BPScott
Copy link
Member

BPScott commented Jul 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants