-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support dynamic import #1197
Comments
the same need |
Please? This is much needed for me. Kills the the point of using the formatter for me. |
In the meanwhile if you can use async/await you can use |
@laggingreflex Thanks for the work around. That will help with with implementing a fix. |
Note, in the original input there is a space. It is preserved in the output in rc6, exactly as you had above. In rc6 if you pass:
You get:
Which is also valid. |
What??? You gotta be kidding, man. No way you dare to label this as resolved simply because the resulting output is valid syntax. |
@ZzZombo |
Oh my god, you weren't kidding, holy shit. It's so fucking stupid that I even have to explain to you why it's wrong that a code formatter makes formatting worse, and BTW, nothing was even "fixed" because nothing was changed. The described – and wrong – behavior remained the same ever since. I mean, if you still don't get it, one can write code with trailing whitespace, it's valid JS still, yea, but wrong nonetheless, so that's why code formatters exist in the first place, to fix such issues, not make even more of them, especially where were none to begin with. |
@renatofdds |
@bitwiseman yes. |
@renatofdds |
@bitwiseman I am sorry, i just used it as an example while writing this issue without thinking too much about it. I think too that beautifier shouldn't handle that space since it's a syntax error. However, the initial issue could be written as: InputThe code looked like this before beautification: frontend = Async(() => import('../frontend').then(m => m.default )) Expected OutputThe code should have looked like this after beautification: frontend = Async(() => import('../frontend').then(m => m.default)) Actual OutputThe code actually looked like this after beautification: frontend = Async(() =>
import('../frontend').then(m => m.default)) I no longer use beautifier so i have no way to tell if this issue is already fixed, i am sorry. If it is already fixed please go ahead and close this. Thank you very much! |
No, it is not fixed, but thanks for taking the time to give cleaned up info. I've updated the original description. |
Implementation note: |
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Environment
OS: Linux 4.10, node 7.10
Settings
Example:
TC39 Proposal
The text was updated successfully, but these errors were encountered: