bublejs / bublejs/buble

Invalid output when a computed property follows a property with an arrow function as value

Open
#263 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
874
Forks
62
PR merge metrics
No merged PRs in 30d

Description

This code:

```
console.log({
Right: () => true,
[1 + 1]: 2
})
```

Produces this output:

```
var obj;
console.log(( obj = {
Right: function () { return true
}; }, obj[1 + 1] = 2, obj ))
```

... which has a semicolon inside an object literal. Probably once again text is inserted in the wrong order (the closing brace of the arrow relative to the semicolon for the return statement).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.