Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2020-04-08 19:58:03 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2020-05-16 22:52:06 +0300
commit91193447fbca4f01fdc7cbb41ce771c3fd928bcf (patch)
treed0a405adc4368f48749bac63971aa72a1d4dcc1f /benchmark
parente53de96a8974099ca01b51870d44de2f2604ff1c (diff)
tools: enable no-else-return lint rule
Refs: https://github.com/nodejs/node/pull/32644 Refs: https://github.com/nodejs/node/pull/32662 PR-URL: https://github.com/nodejs/node/pull/32667 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/es/spread-bench.js7
-rw-r--r--benchmark/scatter.js3
2 files changed, 4 insertions, 6 deletions
diff --git a/benchmark/es/spread-bench.js b/benchmark/es/spread-bench.js
index ae5b4abbb99..284debdfa09 100644
--- a/benchmark/es/spread-bench.js
+++ b/benchmark/es/spread-bench.js
@@ -16,11 +16,10 @@ function makeTest(count, rest) {
return function test(...args) {
assert.strictEqual(count, args.length);
};
- } else {
- return function test() {
- assert.strictEqual(count, arguments.length);
- };
}
+ return function test() {
+ assert.strictEqual(count, arguments.length);
+ };
}
function main({ n, context, count, rest, method }) {
diff --git a/benchmark/scatter.js b/benchmark/scatter.js
index ecbf8e0041c..858169d7d68 100644
--- a/benchmark/scatter.js
+++ b/benchmark/scatter.js
@@ -30,9 +30,8 @@ let printHeader = true;
function csvEncodeValue(value) {
if (typeof value === 'number') {
return value.toString();
- } else {
- return `"${value.replace(/"/g, '""')}"`;
}
+ return `"${value.replace(/"/g, '""')}"`;
}
(function recursive(i) {