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

Put ">" on newline when wrapping multiple attributes #19

Closed
StarpTech opened this issue Aug 19, 2018 · 5 comments
Closed

Put ">" on newline when wrapping multiple attributes #19

StarpTech opened this issue Aug 19, 2018 · 5 comments
Assignees

Comments

@StarpTech
Copy link
Member

For multiple attributes that extend beyond the printWidth, I would prefer this:

<div
  attr="foo"
  attr="foo"
  attr="foo"
  attr="foo"
>bar</div>

over

<div
  attr="foo"
  attr="foo"
  attr="foo"
  attr="foo">bar</div>
@StarpTech
Copy link
Member Author

Fixed with #20

@nivv
Copy link

nivv commented Dec 19, 2018

@StarpTech can we have an option to enable/disable this?

@StarpTech
Copy link
Member Author

Hi @nivv could you eloborate why? I don't add an option so easily the formatter follows the same philosophy about options as prettier

https://prettier.io/docs/en/option-philosophy.html

@nivv
Copy link

nivv commented Dec 19, 2018

@StarpTech I see, I wasn't aware. Languages differ in their style guides. This is awesome for Vue, but if I want to use this for another language the format is "wrong". No worries though!

@StarpTech
Copy link
Member Author

@nivv yes, the experiment of this project is to align them all together. There aren't "wrong" formatting here. There are styles and a lot of opinions 😄 I'm trying to be productive and prettyhtml helps a lot to be in teams.

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

No branches or pull requests

2 participants