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

fix: run prettier rules in git pre-push hook #37

Merged
merged 3 commits into from
May 29, 2023

Conversation

cguedes
Copy link
Collaborator

@cguedes cguedes commented May 25, 2023

This fixes #36

@cguedes cguedes linked an issue May 25, 2023 that may be closed by this pull request
@cguedes cguedes requested a review from sergioramos May 25, 2023 10:17
sehyod
sehyod previously approved these changes May 25, 2023
@hammer
Copy link
Contributor

hammer commented May 25, 2023

@cguedes what are the other changes in this PR? Are they changes suggested by running prettier?

@cguedes
Copy link
Collaborator Author

cguedes commented May 25, 2023

@hammer there are no other changes in this PR.

We created a new command prettier:check that was added to the git pre-push hook.

image

One can run the prettier:fix to fix any prettier issue in the project (ex: missing semi). But that shouldn't happen bc we have format on save configured in the project. But one might save without format or edit outside of vscode so this is an extra safeguard.

@hammer
Copy link
Contributor

hammer commented May 25, 2023

@cguedes I can clearly see many more changes in the PR! There are 2 commits, one of which includes the change you show in your image. Both commits also contain many other changes across 6 other files. I presume those are all changes suggested by prettier but just want to be sure that's the case.

@cguedes
Copy link
Collaborator Author

cguedes commented May 25, 2023

I presume those are all changes suggested by prettier but just want to be sure that's the case.

You are correct. These are only mandatory format fixes (for the git push to be accepted).

@sergioramos sergioramos changed the title Prettier rules don't run in git pre push hook fix: run prettier rules in git pre-push hook May 29, 2023
@sergioramos sergioramos merged commit 1ad9e85 into main May 29, 2023
@sergioramos sergioramos deleted the 36-prettier-rules-dont-run-in-git-pre-push-hook branch May 29, 2023 09:11
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.

Prettier rules don't run in git pre-push hook
4 participants