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

Prettify all the code (ie run prettier) #33

Open
sudarshang opened this issue Mar 21, 2018 · 2 comments
Open

Prettify all the code (ie run prettier) #33

sudarshang opened this issue Mar 21, 2018 · 2 comments

Comments

@sudarshang
Copy link

I followed this blogpost to run prettier on this repo.

This was the command I used to run prettier

git filter-branch -f --tree-filter '\
    prettier --single-quote   \
    --trailing-comma es5 \
    --print-width=100 --write "**/**.js" || \
    echo “Error formatting, possibly invalid JS“' -- --all

I pushed the branch with the rewritted git history to my repo

https://github.com/sudarshang/react-tweet/tree/prettify

Would you be interested in doing a force merge of that branch? I don't have any strong opinions about prettier options. If you want to use another set of options that would be totally fine with me. Since I started with prettier working without automated code formatting has become very difficult for me.

@mannynotfound
Copy link
Owner

hey @sudarshang im not seeing the changes on that branch? the latest commits are from myself

@sudarshang
Copy link
Author

The git filter-branch command re-writes history. So there are no new commits on that branch. All the commits that have already happened have been rewritten to have the prettier auto formatting. If you git clone that repo into a separate directory you can run diff to see how the files have been changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants