Socket
Socket
Sign inDemoInstall

husky

Package Overview
Dependencies
4
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.0-2 to 0.12.0

2

package.json
{
"name": "husky",
"version": "0.12.0-2",
"version": "0.12.0",
"description": "Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

# husky [![](http://img.shields.io/npm/dm/husky.svg?style=flat)](https://www.npmjs.org/package/husky) [![npm version](https://badge.fury.io/js/husky.svg)](http://badge.fury.io/js/husky) [![Build Status](https://travis-ci.org/typicode/husky.svg?branch=master)](https://travis-ci.org/typicode/husky)
# husky [![](http://img.shields.io/npm/dm/husky.svg?style=flat)](https://www.npmjs.org/package/husky) [![npm version](https://badge.fury.io/js/husky.svg)](https://www.npmjs.com/package/husky) [![Build Status](https://travis-ci.org/typicode/husky.svg?branch=master)](https://travis-ci.org/typicode/husky)

@@ -7,6 +7,4 @@ > Git hooks made easy

_Used by [jQuery](https://github.com/jquery/jquery), [Hyper](https://github.com/zeit/hyper), [Paper.js](https://github.com/paperjs/paper.js), [Kibana](https://github.com/elastic/kibana), [JSON Server](https://github.com/typicode/json-server), [Hotel](https://github.com/typicode/hotel), ... and many other awesome projects._
## Install
## Usage
```sh

@@ -16,5 +14,4 @@ npm install husky --save-dev

```javascript
// package.json
// Edit package.json
{

@@ -33,18 +30,34 @@ "scripts": {

Existing hooks aren't replaced and adding `--no-verify` to your git commands lets you bypass hooks. You can also use [any Git hook](HOOKS.md). Optionally include the environment variable `$GIT_PARAMS` in your scripts to access any command-line parameters provided by git.
_Existing hooks aren't replaced and you can use [any Git hook](HOOKS.md)._
## Used by
* [jQuery](https://github.com/jquery/jquery)
* [Next.js](https://github.com/zeit/next.js)
* [Hyper](https://github.com/zeit/hyper)
* [Paper.js](https://github.com/paperjs/paper.js)
* [Kibana](https://github.com/elastic/kibana)
* [JSON Server](https://github.com/typicode/json-server)
* [Hotel](https://github.com/typicode/hotel)
* ... and more than 2000+ [other awesome projects](https://libraries.io/npm/husky/dependent-repositories).
## Uninstall
```bash
npm uninstall husky --save-dev
```
## Tricks
<details>
<summary>Debug hooks easily</summary>
If you need to debug hooks, use `npm run <script-name>`, for example:
### Debug hooks easily
If you need to debug hooks, simply use `npm run <script-name>`. For example:
```bash
npm run precommit
```
</details>
<details>
<summary>Git GUI clients support</summary>
### Git GUI clients support

@@ -54,26 +67,23 @@ If you've installed Node using the [standard installer](https://nodejs.org/en/), [nvm](https://github.com/creationix/nvm) or [homebrew](http://brew.sh/), git hooks will be executed even in GUI applications.

In the case of [`nvm`](https://github.com/creationix/nvm), husky will try to use the `default` installed version or use the project `.nvmrc`.
</details>
<details>
<summary>Accessing Git params</summary>
### Accessing Git params
Git params can be found in `GIT_PARAMS` environment variable.
</details>
<details>
<summary>Cygwin support</summary>
### Git submodule support
Yes :)
</details>
Yes
## Uninstall
### Cygwin support
To uninstall husky and Git hooks, simply run:
Yes
```bash
npm uninstall husky --save-dev
```
### Yarn
For Yarn, you currently need to pass `--force` to be sure that hooks are going to be installed (`yarn add husky --dev --force`). You can also manually install hooks using `node node_modules/husky/bin/install`.
</details>
## License
MIT - [Typicode :cactus:](https://github.com/typicode)

@@ -108,8 +108,8 @@ var fs = require('fs')

expect(() => husky.installFrom('/node_modules/husky'))
expect(function () { husky.installFrom('/node_modules/husky') })
.toNotThrow()
expect(() => husky.uninstallFrom('/node_modules/husky'))
expect(function () { husky.uninstallFrom('/node_modules/husky') })
.toNotThrow()
})
})
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