Skip to content

Commit

Permalink
Workaround for errors sent improperly to stdout by prettier_d
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthugs committed Jun 19, 2024
1 parent fac9dd2 commit 0f67890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prettier-js.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f67890

Please sign in to comment.