From 0f67890e7802fcfce52b7737cfa511450a42e8d3 Mon Sep 17 00:00:00 2001 From: Matt Hughes <6405097+matthugs@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:38:50 -0400 Subject: [PATCH] Workaround for errors sent improperly to stdout by prettier_d From this it should be simple to use `prettier_d` as a drop-in replacement by customizing the `prettier-js-command` custom variable. fixes #34 --- prettier-js.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prettier-js.el b/prettier-js.el index 08d90b8..74ec40c 100644 --- a/prettier-js.el +++ b/prettier-js.el @@ -193,7 +193,7 @@ a `before-save-hook'." (if errbuf (prettier-js--kill-error-buffer errbuf))) (message "Could not apply prettier") (if errbuf - (prettier-js--process-errors (buffer-file-name) errorfile errbuf)) + (prettier-js--process-errors (buffer-file-name) (if (string= prettier-js-command "prettier_d") outputfile errorfile) errbuf)) )) (kill-buffer patchbuf) (delete-file errorfile)