Open AgentOttsel opened 6 years ago
I suspect this part and after adding more check to be like this
const canBreakLine = node.init.some(n =>
n != null &&
n.type !== 'TableConstructorExpression' &&
n.type !== 'FunctionDeclaration' &&
n.type !== 'CallExpression'
);
the result is as you expect
instance = MyClass.new(
{
arguments
}
)
adding checkCallExpression
is just come from hard debugging and I don't understand how it's actually works 🤔
Ooh, nicely done, @Arpple! Do you wanna open a pull request for that? Since you're not sure how it works, maybe we should get @trixnz's opinion first, though.
If I have a variable and assign the result of a function that receives a table to it, like this:
...The formatted code looks like this. It's confusing to me how
MyClass.new(
has the same indentation level as the table that it's receiving:I believe this would be the ideal result: