| 40 columns | |
| >>> Unsplit. |
| if (o case 1 || 2 && 3 ) {} |
| <<< |
| if (o case 1 || 2 && 3) {} |
| >>> Nested as subpattern. |
| if (o case 1 && ( 2 || 3 ) ) {} |
| <<< |
| if (o case 1 && (2 || 3)) {} |
| >>> Chain of same logic operator all split together. |
| if (object case first || second || third || fourth) {;} |
| <<< |
| if (object |
| case first || |
| second || |
| third || |
| fourth) { |
| ; |
| } |
| >>> Chains of different logic operators split separately. |
| if (object case first && second || third && fourth && fifth && sixth) {;} |
| <<< |
| if (object |
| case first && second || |
| third && |
| fourth && |
| fifth && |
| sixth) { |
| ; |
| } |
| >>> Chains of different logic operators split separately. |
| if (object case first && second && third && fourth || fifth && sixth) {;} |
| <<< |
| if (object |
| case first && |
| second && |
| third && |
| fourth || |
| fifth && sixth) { |
| ; |
| } |
| >>> Multiple split variables as logic operands. |
| if (object case SomeVeryLongTypeName anAlsoLongVariableName || AnotherLongTypeName anotherLongVariableName) {;} |
| <<< |
| if (object |
| case SomeVeryLongTypeName |
| anAlsoLongVariableName || |
| AnotherLongTypeName |
| anotherLongVariableName) { |
| ; |
| } |
| >>> Don't indent subsequent `||` operands when split inside a map key. |
| var {key: longOperand2 || longOperand2 || longOperand3} = value; |
| <<< |
| var { |
| key: |
| longOperand2 || |
| longOperand2 || |
| longOperand3, |
| } = value; |
| >>> Don't indent subsequent `&&` operands when split inside a map key. |
| var {key: longOperand2 && longOperand2 && longOperand3} = value; |
| <<< |
| var { |
| key: |
| longOperand2 && |
| longOperand2 && |
| longOperand3, |
| } = value; |