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

Prettier setup #1084

Closed
wants to merge 5 commits into from
Closed

Prettier setup #1084

wants to merge 5 commits into from

Conversation

jiji14
Copy link
Contributor

@jiji14 jiji14 commented Oct 26, 2023

This PR follows #1068.
To review all the discussions regarding the formatting, please refer to the previous PR.
I created a new PR to maintain a clean and readable branch.


Related Issue

For considerations regarding Prettier, please refer to the following GitHub issue: Prettier Issue #1014.


Configuration Options

Our team has carefully chosen these configuration options, which are based on discussions.
To explore more details, please visit the Prettier documentation on options.


How to Run Prettier

You can format your code using Prettier by running the following command:

npx prettier --write {filename}

Auto-Saving

If you wish to enable auto-saving locally, please follow these steps:

  1. Create a .vscode folder at the project's root directory.
  2. Inside the .vscode folder, create a settings.json file and include the following code:
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}
  1. Additionally, install the Prettier - Code formatter VSCode extension.

The next PR will set up GitHub Actions for Prettier.

Copy link
Collaborator

@JGreenlee JGreenlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! LGTM

@shankari
Copy link
Contributor

@JGreenlee @jiji14 this is cool, but we need to figure out the timing.

Once I push the onboarding branch to production, I will attempt to merge it into the current master, at which point, we will have hundreds of merge conflicts.

I am tempted to wait until I have merged onboarding, and have you re-run prettier.
Thoughts?

@jiji14
Copy link
Contributor Author

jiji14 commented Oct 27, 2023

@JGreenlee @jiji14 this is cool, but we need to figure out the timing.

Once I push the onboarding branch to production, I will attempt to merge it into the current master, at which point, we will have hundreds of merge conflicts.

I am tempted to wait until I have merged onboarding, and have you re-run prettier. Thoughts?

Sounds good to me! Once the merge is completed, I will rerun Prettier and then post the PR again.

@jiji14 jiji14 marked this pull request as draft October 27, 2023 16:56
@shankari
Copy link
Contributor

shankari commented Oct 29, 2023

@jiji14 merge is now complete! However, the service_rewrite_2023 branch has significantly diverged from master.
So I would suggest the following flow:

  • everybody pulls from service_rewrite_2023 to their open/pending branches and resolve conflicts
  • you run prettier on service_rewrite_2023
  • people again pull from service_rewrite_2023 to their open/pending branches and resolve conflicts

When we next pull from service_rewrite_2023 to master, the prettier changes will come along by default
There will still likely be merge conflicts, but hopefully I can use git merge -X theirs 😄

@jiji14 jiji14 closed this Nov 2, 2023
@jiji14 jiji14 deleted the prettier-setup-final branch November 2, 2023 20:26
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

Successfully merging this pull request may close these issues.

3 participants