Skip to content

Commit 04eba49

Browse files
authored
chore: update npm deps. Migrate to new eslint config. Minor fixes (#2996)
1 parent fed7ffa commit 04eba49

File tree

12 files changed

+937
-3321
lines changed

12 files changed

+937
-3321
lines changed

.eslintignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 268 deletions
This file was deleted.

bin/asinit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ function ensurePackageJson() {
395395
updated = true;
396396
}
397397
if (!scripts["start"]) {
398-
scripts["start"] = "npx serve .",
398+
scripts["start"] = "npx serve .";
399399
pkg["scripts"] = scripts;
400400
updated = true;
401401
}

cli/index.js

Lines changed: 8 additions & 8 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 (e2) {
428+
} catch {
429429
return prepareResult(e1);
430430
}
431431
}
@@ -670,7 +670,7 @@ export async function main(argv, options) {
670670
.replace(/\\/g, "/")
671671
.replace(extension_re, "")
672672
.replace(/\/$/, "");
673-
673+
674674
// Try entryPath.ext, then entryPath/index.ext
675675
let sourceText = await readFile(sourcePath + extension, baseDir);
676676
if (sourceText == null) {
@@ -867,7 +867,7 @@ export async function main(argv, options) {
867867
// Prepare output
868868
if (!opts.noEmit) {
869869
if (opts.binaryFile) {
870-
// We catched lagacy field for binary output (before 0.20)
870+
// We caught legacy field for binary output (before 0.20)
871871
return prepareResult(Error("Usage of the --binaryFile compiler option is no longer supported. Use --outFile instead."));
872872
}
873873
let bindings = opts.bindings || [];
@@ -959,7 +959,7 @@ export async function main(argv, options) {
959959
writeFile(opts.textFile, out, baseDir)
960960
);
961961
} else if (!hasStdout) {
962-
hasStdout = true;
962+
// hasStdout = true;
963963
writeStdout(out);
964964
}
965965
}
@@ -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
}
@@ -1106,7 +1106,7 @@ async function getConfig(file, baseDir, readFile) {
11061106
try {
11071107
config = JSON.parse(contents);
11081108
} catch(ex) {
1109-
throw new Error(`Asconfig is not valid json: ${location}`);
1109+
throw new Error(`Asconfig is not valid json: ${location}`, { cause: ex });
11101110
}
11111111

11121112
// validate asconfig shape

0 commit comments

Comments
 (0)