Skip to content

Add build and test checks to pre-commit hooks #122

@bhouston

Description

@bhouston

Problem

Currently, our pre-commit hooks only enforce linting and formatting. This allows commits that break the build or fail tests to be pushed to the repository, causing wasted time and effort for the team.

Proposed Solution

Enhance the pre-commit hooks to:

  1. Run pnpm build to ensure the project builds successfully
  2. Run pnpm test to ensure all tests pass

This will prevent commits that would break the build or fail tests, improving code quality and reducing wasted time.

Implementation Details

  • Update the pre-commit hook to run both pnpm build and pnpm test in addition to the existing lint-staged checks
  • Ensure the hook provides clear error messages when checks fail
  • Document the changes in the PR

Benefits

  • Prevents broken code from being committed
  • Saves time by catching issues earlier in the development process
  • Ensures higher quality code in the repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions