Convert parallel assignment (massign) expressions into multiple assignment expressions #94
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Currently, when
@prettier/plugin-ruby
encounters anmassign
expression, it will always print it out as anmassign
. However, there are one case where we don't want to do that:This is functionally equivalent to:
We should handle this inside the
massign
handler insrc/nodes.js
by checking if the number of args on the left is equal to the number of args on the right, that none of them have parens around them, and that none of them are splats. If these conditions are met, themassign
expression should be converted into multiple individual assignments.I'd be happy to pair with someone to accomplish this. It shouldn't take too long once you get the hang of how nodes are being printed.
The text was updated successfully, but these errors were encountered: