forked from typicode/husky
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af03862
commit e49e5fb
Showing
37 changed files
with
6,334 additions
and
26,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# husky | ||
|
||
[![Open Collective](https://opencollective.com/husky/all/badge.svg?label=financial+contributors)](https://opencollective.com/husky) [![](https://img.shields.io/npm/dm/husky.svg?style=flat)](https://www.npmjs.org/package/husky) [![Node.js CI](https://github.com/typicode/husky/workflows/Node.js%20CI/badge.svg)](https://github.com/typicode/husky/actions) | ||
|
||
> Modern native Git hooks made easy | ||
Husky improves your commits and more 🐶 _woof!_ | ||
|
||
# Install | ||
|
||
``` | ||
npm install husky -D | ||
``` | ||
|
||
# Usage | ||
|
||
Edit `package.json > prepare` script and run it once: | ||
|
||
```sh | ||
npm set-script prepare "husky install" | ||
npm run prepare | ||
``` | ||
|
||
Add a hook: | ||
|
||
```sh | ||
npx husky add .husky/pre-commit "npm test" | ||
``` | ||
|
||
Make a commit: | ||
|
||
```sh | ||
$ git commit -m "Keep calm and commit" | ||
# `npm test` will run | ||
``` | ||
|
||
_For more use cases (project in sub-directory, custom directory, CI support, ...), see documentation._ | ||
|
||
## Documentation | ||
|
||
https://typicode.github.io/husky | ||
|
||
**Important** Upgrading from v4 to v7 requires migrating previous config, please see the docs. | ||
|
||
## Articles | ||
|
||
- [Why husky has dropped conventional JS config](https://blog.typicode.com/husky-git-hooks-javascript-config/) | ||
- [Why husky doesn't autoinstall anymore](https://blog.typicode.com/husky-git-hooks-autoinstall/) | ||
|
||
## License | ||
|
||
MIT | ||
|
||
## Companies | ||
|
||
<a href="https://opencollective.com/husky/tiers/company/0/website"><img src="https://opencollective.com/husky/tiers/company/0/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/1/website"><img src="https://opencollective.com/husky/tiers/company/1/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/2/website"><img src="https://opencollective.com/husky/tiers/company/2/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/3/website"><img src="https://opencollective.com/husky/tiers/company/3/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/4/website"><img src="https://opencollective.com/husky/tiers/company/4/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/5/website"><img src="https://opencollective.com/husky/tiers/company/5/avatar.svg" height="80px"></a> | ||
<a href="https://opencollective.com/husky/tiers/company/6/website"><img src="https://opencollective.com/husky/tiers/company/6/avatar.svg" height="80px"></a> | ||
|
||
[Become a sponsor and have your logo here and in the docs](https://opencollective.com/husky/contribute/sponsor-9986/checkout) | ||
|
||
The full list of Sponsors can be viewed in the docs, on Open Collective and on GitHub sponsors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#!/bin/sh | ||
|
||
# shellcheck source=./_/husky.sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
#!/bin/sh | ||
|
||
# shellcheck source=./_/husky.sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.