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 and git pre-commit hook #3961

Merged
merged 12 commits into from
Aug 7, 2023
Merged

Conversation

joeizang
Copy link
Collaborator

@joeizang joeizang commented Aug 2, 2023

Adds prettier formatting to the workspace so before git commit the precommit hook will ask prettier to format all js, tsx, ts and jsx files to be formatted based on the rules we set in the config. This doesn't replace eslint and the work @bunsenstraat did. It simply extends it.

How to test:

  • checkout this branch locally
  • mess up the formatting of any tsx, ts, js or jsx file.
  • try to do a git commit and the pre-commit hook will kick in and trigger prettier to format the code file.

@joeizang joeizang added the ready-to-review PR ready to review label Aug 2, 2023
@joeizang joeizang self-assigned this Aug 2, 2023
@netlify
Copy link

netlify bot commented Aug 2, 2023

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit bcafa37
🔍 Latest deploy log https://app.netlify.com/sites/remixproject/deploys/64d0e2a30641c50007e77d62
😎 Deploy Preview https://deploy-preview-3961--remixproject.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.

@yann300
Copy link
Contributor

yann300 commented Aug 7, 2023

I do git commit -m "test" but the prettier doesn't execute..

@joeizang joeizang merged commit a73c8e0 into master Aug 7, 2023
6 checks passed
@joeizang joeizang deleted the prettier-precommit branch August 7, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-review PR ready to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants