Skip to content

Commit dbbc7d0

Browse files
committed
Small PR feedback things
1 parent 5a900ea commit dbbc7d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"build": "docusaurus build",
66
"lint": "npm run lint:prettier",
77
"lint:prettier": "prettier --check .",
8-
"fix:prettier": "prettier --check --write \"**/*.{js,ts,tsx,html,scss,yml,json,md}\""
8+
"fix:prettier": "prettier --write ."
99
},
1010
"prettier": {
1111
"printWidth": 120,

src/pages/benchviz/visualizations/d3-util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ export function addLegend(
66
) {
77
const legend = selection.append("g");
88

9-
items.forEach(([name, color], i) => {
9+
for (const [index, [name, color]] of items.entries()) {
1010
legend
1111
.append("rect")
1212
.attr("width", 15)
1313
.attr("height", 15)
14-
.attr("x", 100 * i)
14+
.attr("x", 100 * index)
1515
.style("fill", color)
1616
.style("stroke", "currentColor");
1717

1818
legend
1919
.append("text")
20-
.attr("x", 100 * i + 20)
20+
.attr("x", 100 * index + 20)
2121
.attr("y", 13)
2222
.text(name)
2323
.attr("fill", "currentColor");
24-
});
24+
}
2525

2626
return legend;
2727
}

0 commit comments

Comments
 (0)