prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

prettier empties file #58

Open traumschule opened 5 years ago

traumschule commented 5 years ago

If there's an error in .prettierrc prettier empties the file without error. Also arguments shown below are defined in init.el, not in .prettierrc.

Saving file $FILE...
Wrote /tmp/prettiercbd2uV.js
Applied prettier with args ‘(--print-width 100 --single-quote true --trailing-comma all --no-semi true)’
Wrote $FILE

This looks like https://github.com/prettier/vim-prettier/issues/92 although there is no file .prettierignore existant.

$ emacs --version
GNU Emacs 26.1
$ prettier --version
1.18.2
$ ls -l /usr/local/bin/prettier
lrwxrwxrwx 1 root staff 44 Jun 21 11:38 /usr/local/bin/prettier -> ../lib/node_modules/prettier/bin-prettier.js
angelporo commented 3 years ago

me to