Socket
Socket
Sign inDemoInstall

husky

Package Overview
Dependencies
0
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    husky

Git hooks made easy


Version published
Maintainers
1
Install size
25.4 kB
Created

Package description

What is husky?

Husky is an npm package that allows you to manage Git hooks easily. It lets you run scripts at specific points in your Git workflow, such as before committing or pushing code. This helps in automating tasks like code linting, testing, and validation before these actions take place, ensuring code quality and consistency.

What are husky's main functionalities?

Pre-commit Hook

This feature allows you to run commands before a commit is made. In this example, `npm test` and `npm run lint` are executed before each commit, ensuring that tests pass and the code is linted.

"husky": {
  "hooks": {
    "pre-commit": "npm test && npm run lint"
  }
}

Pre-push Hook

This feature allows you to run commands before code is pushed to the repository. In this example, `npm run build` is executed before each push, ensuring that the build is updated.

"husky": {
  "hooks": {
    "pre-push": "npm run build"
  }
}

Commit-msg Hook

This feature allows you to run a script to validate the commit message. In this example, `validate-commit-msg.js` is a script that checks if the commit message follows a certain format.

"husky": {
  "hooks": {
    "commit-msg": "./validate-commit-msg.js"
  }
}

Other packages similar to husky

Readme

Source

husky

Financial Contributors on Open Collective Mac/Linux Build Status Windows Build status

Git hooks made easy

Husky improves your commits and more 🐶woof!


You're viewing documentation for husky v5, which is free to use in Open Source projects ❤️ and in early access for Sponsors 🎁.

To use this new version at work, you can become a sponsor on GitHub Sponsors or Open Collective.

If you can't sponsor Husky, that's okay, husky v4 is free to use in any project. During the early access, v4 will continue to receive maintainance updates.


Sponsors

Companies

Does your company use Husky? Ask your manager or marketing team if your company would be interested in supporting this project.

Individuals

Find Husky helpful? Become a backer and show your appreciation with a monthly donation on Open Collective. You can also tip with a one-time donation.

Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor Husky Sponsor

GitHub sponsors can be viewed on my profile. All past and current Open Collective sponsors can be viewed on Husky's Open Collective.

Keywords

FAQs

Last updated on 16 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc