-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use Prettier on Templates #8161
Conversation
These are technically in javascipt, but by using prettier for both hbs and js we get a nice set of updates here as well.
assert.strictEqual(component.text, ''); | ||
|
||
await render(hbs`<TruncateText></TruncateText> | ||
`); | ||
await render(hbs`<TruncateText />`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to make changes like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this was done too, these are identical expressions though. I guess it makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
less is more. i'm good with that. go prettier!
await render(hbs`<TruncateText> | ||
{{this.shortText}} | ||
</TruncateText>`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is an improvement, but it still seems awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the best/worst things about prettier is that it makes a bunch of choices for you. Sometimes they're awesome, sometimes you hate them. I try and lean into the good part - we don't have to make any of these decisions ourselves.
Lots of Percy diffs, some of them seem relevant and weird. Going to dig in further. Might just be that we need a new set of current screen shots to compare to. |
Hand checked a bunch of these, and Percy is just out of sync with all the big changes we made today. Will re-run this tomorrow and compare to the nightly update from building |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks better to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tests pass, and the formatting of templates is consistent, I can work with it.
Activating
ember-template-lint-plugin-prettier
and running the fixer on all templates, including those in tests.