Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework: Use Prettier #12479

Closed
wants to merge 2 commits into from
Closed

Framework: Use Prettier #12479

wants to merge 2 commits into from

Conversation

samouri
Copy link
Contributor

@samouri samouri commented Mar 23, 2017

Background information for this PR, as well as voting on whether or not you support it, is available here: #12260.

This PR seeks to figure out the details.
I've taken guidance from gh-notifications-client /tree/master/bin

Implementation notes:

  1. Added a precommit hook that prettifies newly added/modified files
  2. Added a eslint style configuration remover.
  3. Ran prettify (cmd provided below)

Commands I ran:

./node_modules/.bin/prettier --write --print-width=100 --single-quote --tab-width=4 --trailing-comma=es5 "{test,server,client}/**/*.jsx"
./node_modules/.bin/prettier --write --print-width=100 --single-quote --tab-width=4 --trailing-comma=es5 "{test,server,client}/**/*.js"
./node_modules/.bin/prettier --write --print-width=100 --single-quote --tab-width=4 --trailing-comma=es5 "*.js"

@matticbot
Copy link
Contributor

@samouri samouri self-assigned this Mar 23, 2017
@samouri
Copy link
Contributor Author

samouri commented Mar 23, 2017

Interesting how many more linebreaks prettier uses than what we were doing. In that sense its actually more liberal about whitespace

@samouri samouri force-pushed the update/use-prettier branch from 737e1b5 to 34f1c21 Compare March 23, 2017 20:56
@samouri samouri force-pushed the update/use-prettier branch from 34f1c21 to c0d8f93 Compare March 23, 2017 21:04
@samouri samouri added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Mar 23, 2017
@gziolo
Copy link
Member

gziolo commented Mar 24, 2017

So we have 300K+ lines in Calypso, and it will increase the number by 7-8%. Interesting.

@dmsnell
Copy link
Member

dmsnell commented Mar 24, 2017

@samouri if we do this, we should probably look at having some "bot" user do the change so it doesn't royally mess with your user stats…

@gziolo
Copy link
Member

gziolo commented Mar 28, 2017

If we introduce prettier we should also mitigate issues with formatting when using codemods. See related discussion: #12521 (review).

@matticbot matticbot added [Size] XL Probably needs to be broken down into multiple smaller issues [Status] Needs Rebase labels Mar 29, 2017
@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

1 similar comment
@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

1 similar comment
@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

1 similar comment
@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

1 similar comment
@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@matticbot
Copy link
Contributor

@samouri This PR needs a rebase

@blowery
Copy link
Contributor

blowery commented Apr 19, 2017

related prettier/prettier-atom#133

@samouri
Copy link
Contributor Author

samouri commented May 12, 2017

closing because I don't plan on pushing this forward in the same capacity anymore. see #14010

@samouri samouri closed this May 12, 2017
@samouri samouri deleted the update/use-prettier branch May 12, 2017 19:34
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 12, 2017
@dmsnell
Copy link
Member

dmsnell commented May 12, 2017

geez @samouri - the least you could have done is rebase it 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework [Size] XL Probably needs to be broken down into multiple smaller issues [Status] Needs Rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants