prettier / prettier-emacs

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

Fix support for non-js files #10

Closed aaronjensen closed 7 years ago

aaronjensen commented 7 years ago

--stdin-filepath is necessary for parser inference to work. This fixes Typescript/json/css/etc support.

rcoedo commented 7 years ago

Thank you!

eqyiel commented 6 years ago

This breaks compatibility with prettier-eslint-cli because that command doesn't have this option.

I think that's more of a problem of prettier-eslint-cli not presenting the same API though. 😿

aaronjensen commented 6 years ago

I'd agree, though perhaps prettier-emacs could take an option for it.

That said, pardon my ignorance, but are there many things that prettier-eslint-cli is still necessary for now that prettier has the no-semi option? I've been able to use https://github.com/prettier/eslint-plugin-prettier for everything since then and https://github.com/aaronjensen/eslintd-fix with https://github.com/mantoni/eslint_d.js in emacs for projects using that.

eqyiel commented 6 years ago

@aaronjensen thanks for the tip, we'll give that a try!