-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 1.7.4
Playground link
Input:
function completeMultipartUpload() {
if (!this._completeMultipartUploadPromise) {
this._completeMultipartUploadPromise = new this.Promise(
(resolve, reject) => {
this.fileTransfer.completeMultipartUpload((err, data) => {
if (err) {
this._completeMultipartUploadPromise = null;
reject(err);
} else {
resolve(data);
}
});
}
);
}
}Output:
function completeMultipartUpload() {
if (!this._completeMultipartUploadPromise) {
this._completeMultipartUploadPromise = new this
.Promise((resolve, reject) => {
this.fileTransfer.completeMultipartUpload((err, data) => {
if (err) {
this._completeMultipartUploadPromise = null;
reject(err);
} else {
resolve(data);
}
});
});
}
}Expected behavior: No change I guess? The fixed version is really hard to read, the Promise executor function body is on the same indentation as the .Promise.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.