Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Multipass formatting #1

Open
zmeyc opened this issue Jun 24, 2020 · 1 comment
Open

Multipass formatting #1

zmeyc opened this issue Jun 24, 2020 · 1 comment

Comments

@zmeyc
Copy link

zmeyc commented Jun 24, 2020

Thank you for opensourcing the plugin, it works great and is very fast! I want to propose a feature:

I'm using prettier + eslint with import order plugin. Prettier has "max 1 empty line rule" enabled. When eslint reorders imports, sometimes more than one empty line appears. This requires one more pass from prettier (so file sometimes needs to be saved twice). Similar situations can happen with other rules too.

Imo this can be worked around by repeatedly running prettier+eslint(+stylelint) until no changes to source code are observed. Possibly just one extra run will be enough, which will cover most of these cases.

I can try coding this in, would you be interested in such a PR?

@swernerx
Copy link
Member

Sounds good! I had the same issue with adding braces to if where prettier needs to reformat things.

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

No branches or pull requests

2 participants