Skip to content

Commit f86a977

Browse files
committed
Merge pull request airbnb#50 from timofurrer/a11223ab93fa8f96724634abe4cfdcf246d05d83
moved link to TOC to the right position
2 parents b913585 + a11223a commit f86a977

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -732,38 +732,38 @@
732732
733733
```
734734

735-
**[[⬆]](#TOC)**
736-
737735
- Use indentation when making long method chains.
738736

739-
```javascript
740-
// bad
741-
$('#items').find('.selected').highlight().end().find('.open').updateCount();
742-
743-
// good
744-
$('#items')
745-
.find('.selected')
746-
.highlight()
747-
.end()
748-
.find('.open')
749-
.updateCount();
750-
751-
// bad
752-
var leds = stage.selectAll('.led').data(data).enter().append("svg:svg").class('led', true)
753-
.attr('width', (radius + margin) * 2).append("svg:g")
754-
.attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
755-
.call(tron.led);
756-
757-
// good
758-
var leds = stage.selectAll('.led')
759-
.data(data)
760-
.enter().append("svg:svg")
761-
.class('led', true)
762-
.attr('width', (radius + margin) * 2)
763-
.append("svg:g")
764-
.attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
765-
.call(tron.led);
766-
```
737+
```javascript
738+
// bad
739+
$('#items').find('.selected').highlight().end().find('.open').updateCount();
740+
741+
// good
742+
$('#items')
743+
.find('.selected')
744+
.highlight()
745+
.end()
746+
.find('.open')
747+
.updateCount();
748+
749+
// bad
750+
var leds = stage.selectAll('.led').data(data).enter().append("svg:svg").class('led', true)
751+
.attr('width', (radius + margin) * 2).append("svg:g")
752+
.attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
753+
.call(tron.led);
754+
755+
// good
756+
var leds = stage.selectAll('.led')
757+
.data(data)
758+
.enter().append("svg:svg")
759+
.class('led', true)
760+
.attr('width', (radius + margin) * 2)
761+
.append("svg:g")
762+
.attr("transform", "translate(" + (radius + margin) + "," + (radius + margin) + ")")
763+
.call(tron.led);
764+
```
765+
766+
**[[⬆]](#TOC)**
767767

768768
## <a name='leading-commas'>Leading Commas</a>
769769

0 commit comments

Comments
 (0)