Closed etiennea closed 6 years ago
@etiennea: what javascript platform are you on? node?
on node v8.1.4
I have no issues with or without the space. That said, I don't think JsBeautifier exposes a setting to control this right now.
e.g. this works fine, no syntax errors:
var Promise = require("bluebird");
async function main() {
var wait = async(interval) => {
return Promise.delay(interval, "all done");
};
var message = await wait(5000);
console.log(message);
}
main();
@jdc0589 @etiennea also this is fixed in JsBeautifier 1.7.4, released today.
Good news! Thanks!
On 9 October 2017 at 01:22, Liam Newman notifications@github.com wrote:
@etiennea https://github.com/etiennea also this is fixed in JsBeautifier 1.7.4, released today.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jdc0589/JsFormat/issues/181#issuecomment-335049317, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGRBc0u-_bB5TFUXqGHtTaAhy1AMjXyks5sqWdigaJpZM4O06WH .
just merged #184, this should be resolved
My problem is that
async (req, res) => {}
gets formatted toasync(req, res) => {}
The space that get removed makes this invalid, this rule should not happen when there is an async.