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

Configure prettier for this project. #24

Merged
merged 5 commits into from
Nov 24, 2022
Merged

Conversation

anshul137
Copy link
Contributor

Closes #23

Description

Added the Prettier into this project

  • In .vscode folder
  • In extensions.json file added Prettier as the recommendation
  • In settings.json added configration.
  • Run Prettier via command line npm run format.
  • Check all the files are formatted via command line npm run format:check
  • Added .prettierignore
  • Added .prettierrc.json
  • Update the CONTRIBUTING.md on how to use Prettier via command line

Copy link
Collaborator

@SerpentBytes SerpentBytes left a comment

Choose a reason for hiding this comment

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

I understand that pushing an empty config file will let the IDE know that we are using prettier, but some content should be in the file. Maybe options such as tabWidth, since I see its equivalent in settings.json. Also, I think you could safely add singleQuote and semi options to prettierrc.json. It should not break the code.

@SerpentBytes
Copy link
Collaborator

See more about options here: https://prettier.io/docs/en/configuration.html

@anshul137
Copy link
Contributor Author

Thanks for the review @SerpentBytes
Quick question
so you want me to move the all the configration from settings.json to prettierrc.json.
and add more options right?

@SerpentBytes
Copy link
Collaborator

It seems like what you need is also being added in #22. Could you collaborate with @sfrunza13 so that when we merge #22 and #24, there's only a single prettier configuration for the codebase? Please, and thank you.

@SerpentBytes
Copy link
Collaborator

SerpentBytes commented Nov 21, 2022

Thanks for the review @SerpentBytes
Quick question
so you want me to move the all the configration from settings.json to prettierrc.json.
and add more options right?

Just add the options to prettierrc needed for this project.
settings.json is fine.

@SerpentBytes SerpentBytes marked this pull request as draft November 21, 2022 22:39
@sfrunza13
Copy link

It seems like what you need is also being added in #22. Could you collaborate with @sfrunza13 so that when we merge #22 and #24, there's only a single prettier configuration for the codebase? Please, and thank you.

@anshul137 The .prettierrc.js file is a config file for prettier that we can commit to ensure it behaves in the way we want it to for anyone who decides to work on the project. Feel free to take the one I have written in my PR and add to yours. I am pretty sure .json also works as a format for the prettierrc file, however I would not commit the .vscode folder as it has to do with the editors settings and not the project I believe.

@SerpentBytes
Copy link
Collaborator

@anshul137 could you please make the requested adjustments? Also, please resolve any merge conflicts.

@anshul137
Copy link
Contributor Author

@SerpentBytes yes i will work on it and fix the conflict
Thanks

@SerpentBytes SerpentBytes marked this pull request as ready for review November 23, 2022 19:28
@SerpentBytes SerpentBytes self-requested a review November 23, 2022 19:38
@anshul137
Copy link
Contributor Author

@anshul137 could you please make the requested adjustments? Also, please resolve any merge conflicts.

@SerpentBytes can you please check and let me know if it need any changes i have resolved the conflict in merge as well.
Thanks

@SerpentBytes
Copy link
Collaborator

@anshul137 LGTM ✅
Let's wait for other reviewers' feedback before we go ahead and merge.

@anshul137
Copy link
Contributor Author

@SerpentBytes Can you merge pull request ?

@SerpentBytes SerpentBytes merged commit 3a1ee4e into Seneca-CDOT:main Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add prettier or other such formatter
5 participants