Lbry-desktop: Use Prettier

Created on 6 Jun 2017  路  6Comments  路  Source: lbryio/lbry-desktop

The Issue

Currently the js code has all sorts of different styles. (single/double quotes, semi/no-semi, tabs/spaces)

I think it would be beneficial to add Prettier to have a more unified code base. I also created a PR implementing it here: https://github.com/lbryio/lbry-app/pull/201

I am creating this issue to see what everyone thinks

Most helpful comment

This is a good idea. Need to look into it a bit more, but expect a merge later today.

All 6 comments

I would love to see prettier integrated :+1:

I prefer tabs, but I know others prefer to use spaces. Maybe we could do a thumbs up/thumbs down on this comment to determine the majority opinion?

Thumbs up: tabs
Thumbs down: spaces

This is a good idea. Need to look into it a bit more, but expect a merge later today.

I think this is a great idea and it will be needed now as more and more people contribute code!

This is merged. I decided to keep spaces over tabs since I think it's more common, but I don't feel strongly about this. I also added trailing commas where supported by ES5 (objects, arrays), switched from single quotes to double quotes, since JSX will be all double quotes anyway, and fixed the monitor path to compile on push.

@alexliebowitz @6ea86b96 @lyoshenka @jackrobison please:
1) Rebase any active branches to be on top of master to minimize later merge headaches.
2) Make sure that auto-formatting is working for you on your next commit.

Are we really going with 80 chars per line max? Can we do something more reasonable, like maybe 120?

Im switching to 120 unless anyone objects.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jsigwart picture jsigwart  路  12Comments

kauffj picture kauffj  路  16Comments

zedeus picture zedeus  路  29Comments

btzr-io picture btzr-io  路  11Comments

ElectronEsq picture ElectronEsq  路  11Comments