It looks like that prettier wraps the function execution in the return value of the arrow function below, in parentheses. Plus it breaks line in the return value while it's unnecessary.
Note: This behavior also breaks syntax highlighting in VSCode.
Prettier 2.0.4
Playground link
Input:
const a = (b) => ({
c: () => "d"
}[c] || (() => b))();
Output:
const a = (b) =>
((
{
c: () => "d",
}[c] || (() => b)
)());
Expected behavior:
const a = (b) => ({
c: () => "d"
}[c] || (() => b))();