prettier / prettier-emacs

Minor mode to format JS code on file save

Home Page:http://jlongster.com/A-Prettier-Formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] add an option to prefer prettier-eslint

maple-leaf opened this issue · comments

Please add an option to prefer prettier-eslint when has prettier-eslint installed locally or globally, use it, else use prettier :-)

There is a prettier-js-command variable that controls which command is used. You can get the behavior you want by checking if you have prettier-eslint in your path and set the one you want as prettier-js-command.

Cheers!

Thanks :-)

@rcoedo Hi Roman, still a emacs newbie, what do I need to configure in my init file to set the prettier-js-command variable to use prettier-eslint?

(setq prettier-js-command "prettier-eslint")
commented

How can I solve this error? I have installed prettier-eslint globally.
(before-save-hook): Error running hook "prettier-js" because: (file-missing Searching for program No such file or directory prettier-eslint)