-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: prettier format files #1369
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1101cd0:
|
6491194
to
28c43f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I think it's a nice opportunity for us to use Git's feature of ignoring commits in the blame view so all this automatic formatting changes don't clutter the blame view of a file, obfuscating important commit information. What do you think? You can find information in this GH Doc.
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 !
28c43f1
to
2714c9b
Compare
2714c9b
to
1101cd0
Compare
## What's the purpose of this pull request? ``` 🧹 This is more for Git housekeeping than the FastStore itself. ``` Create a `.git-blame-ignore-revs` file to list commits that should be ignored from the blame view. This is useful to remove the noise introduced by aesthetic changes such as code formatting: when viewing the blame for a file, we can omit commits that only changed formatting/indentation so we can quickly see what matters. I had [mentioned](#1369 (review)) that #1369 was a good candidate to test this feature (that is relatively new in GH, not Git itself). ## How does it work? By adding a commit SHA/ID to be ignored in the `.git-blame-ignore-revs` file. ## How to test it? See how on _Before_ the changes from the commit "fix: prettier format files", which were only formatting, hid the original blame lines. On _After_ they're restored because that commit is ignored. [Before](https://github.com/vtex/faststore/blame/5aa3958cbbfd2177c691406d147bd4bc6d08c8f1/packages/api/src/platforms/vtex/index.ts)|[After](https://github.com/vtex/faststore/blame/ea45a50eb14eee131526359b18cc9e3da945175f/packages/api/src/platforms/vtex/index.ts) -|- ![CleanShot 2022-07-19 at 20 35 02@2x](https://user-images.githubusercontent.com/381395/179865670-abe9f1f2-8acb-42a9-adbe-5b483049dd1a.png)|![CleanShot 2022-07-19 at 20 35 11@2x](https://user-images.githubusercontent.com/381395/179865649-89146a8f-e95b-4896-a4b3-6681d95e254d.png) ## References - [GH Docs - Ignore commits in the blame view](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view) - [GH Community - Support --ignore-revs-file for blame view to support automated code formatters](community/community#5033) - [Blog - A better git blame with --ignore-rev](https://www.michaelheap.com/git-ignore-rev/)
What's the purpose of this pull request?
Prettier was configured and some files need to be formatted
How it works?
All files will formatted following prettier config
How to test it?
Starters Deploy Preview
References