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 Husky git hooks to the monorepo for TS packages #390

Open
14 tasks
VGau opened this issue Dec 4, 2024 · 0 comments
Open
14 tasks

Add Husky git hooks to the monorepo for TS packages #390

VGau opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels
dependencies Pull requests that update a dependency file P3: Low Issue priority: low

Comments

@VGau
Copy link
Collaborator

VGau commented Dec 4, 2024

Description

Integrate Husky into the monorepo to manage Git hooks for TypeScript packages. The hooks should enforce code quality by automating linting, formatting, and testing tasks during specific Git events, such as pre-commit or pre-push. This will ensure consistent code quality and prevent errors from being committed.

Motivation

Implementing Husky will automate code quality checks and improve developer productivity by catching issues earlier in the development process. It ensures consistency across the TypeScript packages and reduces review effort by minimizing avoidable errors.

Tasks

  • Install Husky as a development dependency in the monorepo
  • Configure Husky to manage Git hooks for the TypeScript packages
  • Implement a pre-commit hook for linting (e.g., eslint)
  • Implement a pre-commit hook for formatting (e.g., prettier)
  • Implement a pre-push hook to run tests (e.g., jest)
  • Test the hooks locally and ensure they only take into account TS packages
  • Document the setup and usage in the monorepo README or developer guide.

Acceptance criteria

  • Git hooks are triggered successfully when committing or pushing changes
  • Linting, formatting, and testing tasks run automatically without errors
  • Documentation is updated to reflect the Husky integration and its usage
  • Verification from at least one other developer that the setup works in their environment

Risks

  • Potential conflicts with existing CI/CD workflows if hooks are misconfigured
  • Developer environments may differ, causing unexpected errors during hook execution
  • Increased time for commits/pushes if tasks are not optimized
@VGau VGau added dependencies Pull requests that update a dependency file P3: Low Issue priority: low labels Dec 4, 2024
@kyzooghost kyzooghost mentioned this issue Dec 11, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file P3: Low Issue priority: low
Projects
None yet
Development

No branches or pull requests

2 participants