dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
Logical operators in if statement
Logical operators show coupling behavior when using && in a multi-line if statement. For instance:
if (
true
|| true && true
) {
// ...
}
This behavior make sence, but when the line becomes too long, the && operator is indented under the || operator, which suggests a logical coupling:
if (
true
|| true
&& true
) {
// ...
}
Is there a way to maintain the coupling of lines while ignoring the maximum width? Alternatively, if a line must be forced onto a new line, can we configure the settings to disable this additional indentation?
if (
true
|| true
&& true
) {
// ...
}