Skip to content

Misleading Documentation. prepare needs to be in pre-checkout, not pre-commit #1583

@azizoid

Description

@azizoid

this part of the documentation can mislead that prepare script is placed in the pre-commit script in husky.
when prepare needs to be in pre-checkout.

The init command simplifies setting up husky in a project. It creates a pre-commit script in .husky/ and updates the prepare script in package.json. Modifications can be made later to suit your workflow.

Troubleshoot

If you're migrating from husky 4, see:
https://typicode.github.io/husky/migrate-from-v4.html

Context
Please describe your issue and provide some context:

  • Core installation and documentation
  • pnpm exec husky init

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions