Skip to content

Commit 5512ecb

Browse files
gengjiawenBethGriggs
authored andcommitted
benchmark: tidy up eslint ignore in foreach-bench.js
PR-URL: #26925 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
1 parent 25d5198 commit 5512ecb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

benchmark/es/foreach-bench.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@ function useFor(n, items, count) {
1212
bench.start();
1313
for (var i = 0; i < n; i++) {
1414
for (var j = 0; j < count; j++) {
15-
/* eslint-disable no-unused-vars */
15+
// eslint-disable-next-line no-unused-vars
1616
const item = items[j];
17-
/* esline-enable no-unused-vars */
1817
}
1918
}
2019
bench.end(n);
2120
}
2221

2322
function useForOf(n, items) {
24-
var item;
2523
bench.start();
2624
for (var i = 0; i < n; i++) {
27-
for (item of items) {}
25+
// eslint-disable-next-line no-unused-vars
26+
for (const item of items) {}
2827
}
2928
bench.end(n);
3029
}
@@ -33,9 +32,8 @@ function useForIn(n, items) {
3332
bench.start();
3433
for (var i = 0; i < n; i++) {
3534
for (var j in items) {
36-
/* eslint-disable no-unused-vars */
35+
// eslint-disable-next-line no-unused-vars
3736
const item = items[j];
38-
/* esline-enable no-unused-vars */
3937
}
4038
}
4139
bench.end(n);

0 commit comments

Comments
 (0)