Open dedesite opened 2 years ago
Hi, have you solved the problem now?
Quoting the input and output from that link for handy reference in the thread:
// input:
const SubClass = (MainClass) =>
class extends MainClass {
};
// output:
const SubClass = (MainClass) =>
(class extends MainClass {
});
So a pair of parens is getting added around the body of an arrow function, in a case where it's not needed. Specifically, when the body is a class expression / ClassExpression.
I don't have a diagnosis, but this looks likely related to the same area of code that was involved in issue #743 / PR #1068.
I've sent a PR that should fix this issue: #1128.
The README states that :
But I came with a code that do not guaranty the above statement : https://astexplorer.net/#/gist/e94f3e50e6148f56b57022fbf5f04f68/latest
I know it's not a big deal, but it could be fixed, it would be great :+1: Otherwise reapplying our code formatter at the end will do the tricks.