Skip to content

Commit ff90caf

Browse files
authored
fix(eslint-config): don't report on Prettier crashes (#45)
Signed-off-by: Dirk de Visser <[email protected]>
1 parent 13f1f56 commit ff90caf

File tree

1 file changed

+5
-1
lines changed
  • packages/eslint-config/src/format-plugin

1 file changed

+5
-1
lines changed

packages/eslint-config/src/format-plugin/worker.cts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ const { runAsWorker } = require("synckit");
33
const { format } = require("prettier");
44

55
runAsWorker(async (code: string, options: any) => {
6-
return format(code, options);
6+
try {
7+
return format(code, options);
8+
} catch {
9+
return code;
10+
}
711
});

0 commit comments

Comments
 (0)