Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration for placing logical/binary operators on previous or next line #149

Closed
dsherret opened this issue Aug 18, 2019 · 0 comments
Closed

Comments

@dsherret
Copy link
Member

For example, right now the default does this:

const mathResult = 1 + 2 * 6
    + moreMath * math;

But maybe someone would prefer:

const mathResult = 1 + 2 * 6 +
    moreMath * math;

The default should remain the same since it's easier to read though.

Probably "newLineOperatorPosition" or just "operatorPosition" with options "sameLine" and "nextLine" (or maybe "preferNextLine").

Also applies to ternary operators.

@dsherret dsherret changed the title Configuration for placing logical/binary expressions on previous or next line Configuration for placing logical/binary operators on previous or next line Aug 18, 2019
@dsherret dsherret transferred this issue from dprint/dprint Jul 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant