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

Can anybody write a prettier-standard emacs package?

adispring opened this issue · comments

Set prettier-js-command to "prettier-standard".

Yes,I replace all prettier-js to prettier-standard-js, it works!. This is my forked repo:https://github.com/adispring/prettier-emacs/blob/master/prettier-standard-js.el

and the temporary package install method:

    (prettier-standard-js :location (recipe
                         :fetcher github
                         :repo "adispring/prettier-emacs")) ;; prettier-standard,from github

Honestly you don't need your own package, it's one line of configuration to use with this package and you won't have to worry about maintaining updates.

(setq prettier-js-command "prettier-standard")

Yeah, that works. Great!

Is there a good way to change the prettier-js-command on a per project basis? I tried to use the directory variables feature by placing the following in a .dir-locals.el file:

((nil . ((prettier-js-command . "prettier-standard"))))

But I got a message saying that it was dangerous to set the prettier-js-command on a per-file basis.