-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Spurious {" "} introduced #1072
Comments
@for some reason, this gets left alone:
|
Hi @houshuang, I guess this is related to this closed issue #1061. |
Yeah, I realize it makes sense... And why the second example gets "left alone" :) However, it looks horrible, and is definitively not what I expected... Not sure how to fix it. Would prefer to just leave the line alone, but understand that Prettier wants to enforce line-length... |
I've actually noticed this too. @rattrayalex Do you have any strong opinions about this? Is there any way we could be a little more lenient on this? I don't know what we could do without actually changing semantics, but it's worth talking about. |
Yeah, this has been discussed in a couple other threads... mostly #1021 and #963 (#1061 is actually different). It'd be nice to merge the conversation before further discussion – @jlongster would you be willing to pick a thread to merge into so we can close the other two issues? |
(tl;dr, I hope we fix this, but we'll probably need to introduce a new primitive) |
Let's merge on #963 as it seems to have the most discussion. Thanks! |
Currently, this line (which compiles fine, and does what it's supposed to)
gets transformed into this:
...which is not what I had expected.
https://prettier.github.io/prettier/#%7B%22content%22%3A%22%3Cfont%20size%3D%7B-3%7D%3E%3Ci%3EStarting%20at%20minute%20%7BgraphActivity.startTime%7D%2C%20running%20for%20%7BgraphActivity.length%7D%20to%20minute%20%7BgraphActivity.startTime%20%2B%20graphActivity.length%7D%3C%2Fi%3E%3C%2Ffont%3E%5Cn%22%2C%22options%22%3A%7B%22printWidth%22%3A80%2C%22tabWidth%22%3A2%2C%22singleQuote%22%3Afalse%2C%22trailingComma%22%3A%22none%22%2C%22bracketSpacing%22%3Atrue%2C%22jsxBracketSameLine%22%3Afalse%2C%22parser%22%3A%22babylon%22%2C%22doc%22%3Afalse%7D%7D
The text was updated successfully, but these errors were encountered: