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

Add prettier formatting #177

Merged
merged 7 commits into from
Mar 31, 2025
Merged

Add prettier formatting #177

merged 7 commits into from
Mar 31, 2025

Conversation

ElectricMountains
Copy link
Contributor

@ElectricMountains ElectricMountains commented Mar 31, 2025

This PR adds prettier formatting as default for the project. It does this in the following ways:

  • Install prettier with its config files
  • Install Husky to run it every time you commit code
  • Add a github action that checks if all files are formatted

For more details: https://prettier.io/docs/install

Fixes #47
Part of #159

Copy link

netlify bot commented Mar 31, 2025

Deploy Preview for powernetzero ready!

Name Link
🔨 Latest commit fb3d6f6
🔍 Latest deploy log https://app.netlify.com/sites/powernetzero/deploys/67ea7e8fc21f4200085e98eb
😎 Deploy Preview https://deploy-preview-177--powernetzero.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ElectricMountains
Copy link
Contributor Author

ElectricMountains commented Mar 31, 2025

@drifter089 @BryanFran
I've added a check for prettier formatting, that is failing at the moment due to a bunch of files needing formatting.
Shall we use the meeting later today to format then merge this PR?
During the meeting we just have to run the command "npx prettier . --write", which will format everything.

From then onwards a github check runs "npx prettier --check ." which means PRs will only pass when the files are all correctly formatted. Feel free to share your thoughts.

@ElectricMountains ElectricMountains marked this pull request as ready for review March 31, 2025 11:37
@drifter089
Copy link
Collaborator

@ElectricMountains ,
this is great , can we have a way so pre-commit bot or a action adds these commits and our commit history remains intact.

Copy link
Collaborator

@drifter089 drifter089 left a comment

Choose a reason for hiding this comment

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

super we can do auto bot later

@drifter089 drifter089 merged commit f63f91a into main Mar 31, 2025
6 of 8 checks passed
@drifter089 drifter089 deleted the feat/prettier_precommit branch March 31, 2025 14:37
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.

add pretier formatting config
2 participants