-
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
Object property indented after await
#1517
Comments
This is also a problem in multi-variable assignment statements. E.g.: const os = require('os');
const foo = async =>{};
const a = 1,
b = 2,
c = await foo(),
d = 3,
e = await foo(),
f = 4,
g = 5,
h = await foo(),
i = await foo(),
j = (await foo()),
k = (await foo()),
l = 6,
m = 7,
n = await foo(),
o = 8; Becomes: const os = require('os');
const foo = async =>{};
const a = 1,
b = 2,
c = await foo(),
d = 3,
e = await foo(),
f = 4,
g = 5,
h = await foo(),
i = await foo(),
j = (await foo()),
k = (await foo()),
l = 6,
m = 7,
n = await foo(),
o = 8; Note that it's not an issue if the whole await-call expression is enclosed with parentheses. |
Thanks for the detailed issue report. This will help craft a fix. Docs for |
Just confirmed that the Issue wasn't present in v1.7.5. |
Please try some inputs on https://beautifier.io/ and see if they look right. |
@bitwiseman Looks great! Thanks again. |
Description
Since version 1.8.1, When formatting an object, a property is indented if the previous property is initialized using the
await
keyword.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:
Settings
Default
The text was updated successfully, but these errors were encountered: