KristerV / heliumpay-budgetweb-backend

2 stars 2 forks source link

Add prettier #5

Closed jschr closed 7 years ago

jschr commented 7 years ago

Ended up being really easy to add prettier so I figured I'd make this PR to show you what it looks like.

This PR has #3 and #4 merged in already so IF we want this PR it can be merged it right after those. IF you want merge this, I'd suggest doing so before any other code changes to avoid conflicts.

Includes a pre-commit hook that formats the files in hope to be as unobtrusive to your workflow as possible.

I really have no stylistic preferences (I just like consistency 😄) so take a look at https://github.com/prettier/prettier and feel free to add a config file.

KristerV commented 7 years ago

Okay this thing is awesome. However

  1. the PR is conflicted now that I merged the previous ones (wasn't before).
  2. Also would be great to have the prettier commit separate from the formatting. Right now I have no understanding of what is necessary to configure prettier. Then again if that's a hassle then let's roll with it.
jschr commented 7 years ago

Yeah that makes sense, I'll recreate it without formatting all the files!

KristerV commented 7 years ago

oh i just edited my response. the pre-commit is awesome btw. Looking at the options how to configure - i love my tabs :smirk:

KristerV commented 7 years ago

So thats

tabWidth: 4,
useTabs: true,
semi: false // Seems it still puts semicolon where it's actually needed.