squint icon indicating copy to clipboard operation
squint copied to clipboard

Add prettier config

Open corasaurus-hex opened this issue 2 years ago • 5 comments

It would be nice to have automatic and consistent formatting for js code as we write it.

https://prettier.io/

corasaurus-hex avatar Aug 15 '22 01:08 corasaurus-hex

I'm fine with this. I just don't get some decisions but if I can setup my emacs that it will do this for me, I will cave.

borkdude avatar Aug 15 '22 09:08 borkdude

Already installed, geez, that was easy:

npm install -g prettier
package-install prettier-js
M-x prettier-js-mode

borkdude avatar Aug 15 '22 09:08 borkdude

@corasaurus-hex I'm not sure what needs to be done before closing this issue

borkdude avatar Aug 16 '22 21:08 borkdude

We can add a prettierrc file into the root of the project which prettier will pick up and use so that we get consistent formatting across devs and across editors.

corasaurus-hex avatar Aug 16 '22 23:08 corasaurus-hex

We can also add prettier as a dev dependency so that everyone gets a consistent version for formatting.

corasaurus-hex avatar Aug 16 '22 23:08 corasaurus-hex