Format assignments more consistently#10222
Conversation
2805616 to
e94cc2a
Compare
b5957b8 to
719746a
Compare
e3da2b2 to
3b26905
Compare
6a5214d to
97b9b70
Compare
f5b8014 to
adff4ac
Compare
| var numberValue2_renamed2 = require("ES6_ExportFrom_Intermediary2") | ||
| .numberValue2_renamed2; | ||
| var numberValue2_renamed2 = | ||
| require("ES6_ExportFrom_Intermediary2").numberValue2_renamed2; |
There was a problem hiding this comment.
I am afraid we will get a lot of issues on this, but for me it looks very good, better, so I am 👍 on it
There was a problem hiding this comment.
Do you think many people prefer to have that property on a separate line? We'll see.
I'm done with this PR, BTW. What do you think about the rest of the changes? If you approve it (or somebody else), I'll merge it today.
| a: | ||
| a(), | ||
| b: | ||
| [], |
There was a problem hiding this comment.
It's beyond printWidth. If the names of the keys were longer, it wouldn't look that bad. Special handling for short keys is a separate open issue: #3711
| function Bar() { | ||
| throw new Error("Internal error: Illegal constructor"); | ||
| } | ||
| ) |
There was a problem hiding this comment.
minor but also looks unintended?
There was a problem hiding this comment.
Something to improve in the future. The idea was to format type assertions similarly to function calls while preserving at the same time the usual behavior of comments in Prettier. If a comment is on its own line, Prettier doesn't change that. But now I see that the behavior of the parens could depend on this condition (whether the comment is own-line) too.
Description
A take on #2482
Checklist
changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨