Skip to content

Commit

Permalink
feat: husky 7
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jul 1, 2021
1 parent 4e7c6dc commit a8e427a
Show file tree
Hide file tree
Showing 37 changed files with 6,334 additions and 26,958 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/issue.md
Expand Up @@ -8,11 +8,11 @@ assignees: ''
---

**Troubleshoot**
Before creating an issue, please check:
- [ ] Before creating an issue, please check:
https://typicode.github.io/husky/#/?id=troubleshoot

If you're migrating from husky 4, see:
https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v6
https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7

**Context**
Please describe your issue and provide some context:
Expand Down
66 changes: 66 additions & 0 deletions .github/README.md
@@ -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.
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Expand Up @@ -25,4 +25,5 @@ jobs:
run: npm i -g npm@7
- run: npm ci --ignore-scripts
- run: npm test
- run: npm exec eslint . --ext .ts --ignore-path .gitignore

1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/commit-msg
@@ -1,6 +1,4 @@
#!/bin/sh

# shellcheck source=./_/husky.sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
2 changes: 0 additions & 2 deletions .husky/pre-commit
@@ -1,6 +1,4 @@
#!/bin/sh

# shellcheck source=./_/husky.sh
. "$(dirname "$0")/_/husky.sh"

npm test
39 changes: 6 additions & 33 deletions README.md
@@ -1,5 +1,4 @@
# 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
Expand All @@ -13,52 +12,26 @@ npm install husky --save-dev

# Usage

Edit `package.json > prepare` script and run `prepare` script once:
Edit `package.json > prepare` script and run it once:

```sh
$ npm set-script prepare "husky install"
$ npm run prepare
npm set-script prepare "husky install"
npm run prepare
```

Add a hook:

```sh
$ npx husky add .husky/pre-commit "npm test"
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, see documentation.

## Documentation
# Documentation

https://typicode.github.io/husky

__Important__ Upgrading from v4 to v6 requires additional steps, 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="160px"></a>
<a href="https://opencollective.com/husky/tiers/company/1/website"><img src="https://opencollective.com/husky/tiers/company/1/avatar.svg" height="160px"></a>
<a href="https://opencollective.com/husky/tiers/company/2/website"><img src="https://opencollective.com/husky/tiers/company/2/avatar.svg" height="160px"></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="160px"></a>
<a href="https://opencollective.com/husky/tiers/company/5/website"><img src="https://opencollective.com/husky/tiers/company/5/avatar.svg" height="160px"></a>
<a href="https://opencollective.com/husky/tiers/company/6/website"><img src="https://opencollective.com/husky/tiers/company/6/avatar.svg" height="160px"></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.
File renamed without changes.
4 changes: 0 additions & 4 deletions jest.config.js

This file was deleted.

6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

0 comments on commit a8e427a

Please sign in to comment.