Skip to content

Use husky to ensure eslint & prettier rules on git commits #643

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

onnimonni
Copy link
Contributor

When I was doing #642 I realized that my editor didn't automatically force the formatting rules and thus if it would have been merged the main branch would be failing it's tests.

By adding husky similiarly as we have in https://github.com/notionX/react-notion-x/ we can avoid these unnecessary issues which computers can automate for us.

Copy link

vercel bot commented Nov 1, 2024

@onnimonni is attempting to deploy a commit to the Saasify Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/husky@8.0.3 environment, filesystem, shell 0 6.44 kB typicode
npm/lint-staged@12.5.0 Transitive: environment, filesystem, shell +70 6.73 MB okonet

View full report↗︎

Copy link

charliechecks bot commented Mar 18, 2025

I was unable to review the PR due to technical issues - the system couldn't find the remote branch 'add-husky-to-fix-formatting-on-commits'.

Here's my review based on the available information in the pull request:

Pull Request Review: Add Husky for Formatting Enforcement

Overview

This PR adds Husky to enforce eslint and prettier rules on git commits, similar to what's implemented in the react-notion-x repository. This is a good practice that helps prevent formatting inconsistencies from being merged into the main branch.

Positive Aspects

  • Automating code quality checks is valuable for maintaining consistent code style
  • Preventing formatting issues before they reach the main branch saves time in code reviews
  • Following established patterns from other repositories in the organization creates consistency

Suggestions

  • Consider including details about the specific hooks being added and their configuration
  • Document the new development workflow so other contributors understand what to expect
  • Ensure the Husky configuration is not too strict, which might frustrate contributors

Questions

  1. Have you tested the hooks to ensure they work correctly with the current development workflow?
  2. Is there any additional setup required for new contributors?
  3. Does this include any performance optimizations to ensure the hooks run quickly?

I recommend approving this PR once any documentation updates are included to help onboard other developers to the new workflow.

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.

1 participant