Skip to content

Commit

Permalink
fix(eslint-config): don't report on Prettier crashes (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk de Visser <[email protected]>
  • Loading branch information
dirkdev98 authored May 5, 2024
1 parent 13f1f56 commit ff90caf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/eslint-config/src/format-plugin/worker.cts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ const { runAsWorker } = require("synckit");
const { format } = require("prettier");

runAsWorker(async (code: string, options: any) => {
return format(code, options);
try {
return format(code, options);
} catch {
return code;
}
});

0 comments on commit ff90caf

Please sign in to comment.