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 formatting pre-commit check #1778

Closed
lakshz opened this issue Feb 1, 2024 · 4 comments
Closed

add formatting pre-commit check #1778

lakshz opened this issue Feb 1, 2024 · 4 comments
Assignees

Comments

@lakshz
Copy link
Contributor

lakshz commented Feb 1, 2024

Is your feature request related to a problem? Please describe.
We don't check correct prettier formatting of code before commit, though we do have lint checks.

Describe the solution you'd like
Use the scripts defined in package.json and check for formatting before every commit.

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359

@github-actions github-actions bot added the unapproved Unapproved for Pull Request label Feb 1, 2024
@palisadoes palisadoes removed the unapproved Unapproved for Pull Request label Feb 1, 2024
@palisadoes
Copy link
Contributor

Closing. This doesn't seem valid

@palisadoes palisadoes closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
@palisadoes palisadoes reopened this Feb 2, 2024
@palisadoes
Copy link
Contributor

  1. Sorry about the hasty closing of the issue and PR
  2. Your PR didn't address the formatting. Why?

@lakshz
Copy link
Contributor Author

lakshz commented Feb 2, 2024

  1. on the first commit in the PR, I added npm run format:fix in the husky file, which fixes formatting in all the code files.
  2. but then I found that lint-staged is already configured to format the staged files. And, it works fine. So, I restored the husky file.
    image

if we want to format all code before committing, issue remains open. Else, we can close this.

(In talawa-admin, pre-commit formats full code https://github.com/PalisadoesFoundation/talawa-admin/blob/main/.husky/pre-commit )

PS: The issue was raised because I'd to fix the formatting and re-push my changes in my other PR #1774, maybe I was not on the latest code, and that's why the GitHub PR workflow format check was failing.

@palisadoes
Copy link
Contributor

OK, that makes sense.
Thanks for the clarification.

@palisadoes palisadoes closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants