grain icon indicating copy to clipboard operation
grain copied to clipboard

Grainfmt: Use Prettier's logic for infix operators

Open ospencer opened this issue 3 years ago • 0 comments

I think Prettier has a really solid DX around infix operators. If the operator is all the same, they don't add any parens, but they do otherwise. It adds a lot of clarity to the code.

You can see their logic here: https://github.com/prettier/prettier/blob/main/src/language-js/print/binaryish.js

ospencer avatar Jul 31 '22 16:07 ospencer