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.
1 parent 78309e7 commit b47a1c0Copy full SHA for b47a1c0
1 file changed
README.md
@@ -613,30 +613,40 @@
613
614
## Blocks
615
616
- - Use braces with all multi-line blocks.
+ - Use braces with all blocks.
617
618
```javascript
619
// bad
620
if (test)
621
return false;
622
-
623
- // good
+
+ // bad
624
if (test) return false;
625
626
// good
627
if (test) {
628
629
}
630
+ ```
631
+ - Avoid one line blocks
632
633
+ ```javascript
634
635
function() { return false; }
636
637
638
function() {
639
640
- ```
641
642
643
+ if (test) { return false; }
644
645
+ // good
646
+ if (test) {
647
+ return false;
648
+ }
649
650
- If you're using multi-line blocks with `if` and `else`, put `else` on the same line as your
651
`if` block's closing brace.
652
0 commit comments