We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb57ade + 795dfc7 commit d833bedCopy full SHA for d833bed
README.md
@@ -2033,6 +2033,30 @@
2033
const baz = !c;
2034
```
2035
2036
+ <a name="comparison--multiline"></a><a name="15.8"></a>
2037
+ - [15.8](#comparison--multiline) Avoid unneeded ternary statements.
2038
+
2039
+ eslint rules: [`multiline-ternary`](http://eslint.org/docs/rules/multiline-ternary).
2040
2041
+ ```javascript
2042
+ // bad
2043
+ someStatement ?
2044
+ value1
2045
+ :
2046
+ value2;
2047
2048
+ //bad
2049
+ someStatement
2050
+ ? value1
2051
+ : value2;
2052
2053
2054
+ // good
2055
2056
+ value1 :
2057
2058
+ ```
2059
2060
**[⬆ back to top](#table-of-contents)**
2061
2062
0 commit comments