mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 04:38:00 -05:00
[guide] Fix chaining example to be consistent with string interpolation
This commit is contained in:
committed by
Jordan Harband
parent
019a6edaaa
commit
6eacbc2aad
@@ -2174,7 +2174,7 @@ Other Style Guides
|
||||
// bad
|
||||
const leds = stage.selectAll('.led').data(data).enter().append('svg:svg').classed('led', true)
|
||||
.attr('width', (radius + margin) * 2).append('svg:g')
|
||||
.attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')')
|
||||
.attr('transform', `translate(${radius + margin},${radius + margin})`)
|
||||
.call(tron.led);
|
||||
|
||||
// good
|
||||
@@ -2184,7 +2184,7 @@ Other Style Guides
|
||||
.classed('led', true)
|
||||
.attr('width', (radius + margin) * 2)
|
||||
.append('svg:g')
|
||||
.attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')')
|
||||
.attr('transform', `translate(${radius + margin},${radius + margin})`)
|
||||
.call(tron.led);
|
||||
|
||||
// good
|
||||
|
||||
Reference in New Issue
Block a user