Skip to content

Commit

Permalink
fix internal violations
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkwaiblinger committed Feb 23, 2024
1 parent 91a7725 commit ef47613
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/tools/generate-breaking-changes.mts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ async function main(): Promise<void> {
);
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
});
2 changes: 1 addition & 1 deletion packages/repo-tools/src/generate-configs.mts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,6 @@ async function main(): Promise<void> {
);
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
});
2 changes: 1 addition & 1 deletion packages/repo-tools/src/generate-contributors.mts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async function main(): Promise<void> {
);
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
process.exitCode = 1;
});
2 changes: 1 addition & 1 deletion packages/repo-tools/src/generate-lib.mts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ async function main(): Promise<void> {
console.log('Autofixed lint errors');
}

main().catch(e => {
main().catch((e: unknown) => {
console.error(e);
// eslint-disable-next-line no-process-exit
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/repo-tools/src/generate-sponsors.mts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async function stringifyObject(
});
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
process.exitCode = 1;
});
2 changes: 1 addition & 1 deletion packages/types/tools/copy-ast-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function main(): Promise<void> {
]);
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
process.exitCode = 1;
});
9 changes: 7 additions & 2 deletions packages/website/src/components/editor/useSandboxServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@ export const useSandboxServices = (
sandboxInstance,
});
})
.catch(setServices);

.catch((err: unknown) => {
if (err instanceof Error) {
setServices(err);
} else {
setServices(new Error(String(err)));
}
});
return (): void => {
if (!sandboxInstance) {
return;
Expand Down
2 changes: 1 addition & 1 deletion packages/website/tools/generate-website-dts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async function main(): Promise<void> {
);
}

main().catch(error => {
main().catch((error: unknown) => {
console.error(error);
process.exitCode = 1;
});

0 comments on commit ef47613

Please sign in to comment.