Skip to content

Commit 3e9d27e

Browse files
committed
fix lint warnings
1 parent bbee85d commit 3e9d27e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

cli/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export async function main(argv, options) {
425425
} catch (e1) {
426426
try {
427427
transform = require(resolved);
428-
} catch (_) {
428+
} catch {
429429
return prepareResult(e1);
430430
}
431431
}
@@ -1024,7 +1024,7 @@ export async function main(argv, options) {
10241024
try {
10251025
stats.readCount++;
10261026
return await fs.promises.readFile(name, "utf8");
1027-
} catch (e) {
1027+
} catch {
10281028
return null;
10291029
}
10301030
}
@@ -1038,7 +1038,7 @@ export async function main(argv, options) {
10381038
await fs.promises.mkdir(dirPath, { recursive: true });
10391039
await fs.promises.writeFile(filePath, contents);
10401040
return true;
1041-
} catch (e) {
1041+
} catch {
10421042
return false;
10431043
}
10441044
}
@@ -1049,7 +1049,7 @@ export async function main(argv, options) {
10491049
stats.readCount++;
10501050
return (await fs.promises.readdir(path.join(baseDir, dirname)))
10511051
.filter(file => extension_re_except_d.test(file));
1052-
} catch (e) {
1052+
} catch {
10531053
return null;
10541054
}
10551055
}

tests/allocators/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ async function test(file) {
4040
try {
4141
alloc(COMMON_MAX + 1, 0); // unreachable
4242
overflow = true;
43-
} catch (e) { /* nop */ }
43+
} catch { /* nop */ }
4444
if (overflow) throw Error("allocation can overflow COMMON_MAX + 1");
4545
try {
4646
alloc(0xffffffff, 0); // unreachable
4747
overflow = true;
48-
} catch (e) { /* nop */ }
48+
} catch { /* nop */ }
4949
if (overflow) throw Error("allocation can overflow 0xffffffff");
5050
}
5151

tests/allocators/runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function runner(exports, runs, allocs) {
4141
console.log("base: " + base);
4242
try {
4343
reset();
44-
} catch (e) {
44+
} catch {
4545
free(base);
4646
}
4747
let currentMem = exports.memory.buffer.byteLength;

0 commit comments

Comments
 (0)