You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/README.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ You can use it to **lint your commit messages**, **run tests**, **lint code**, e
10
10
11
11
- Zero dependencies and lightweight (`6 kB`)
12
12
- Powered by modern new Git feature (`core.hooksPath`)
13
-
- Follows [npm](https://docs.npmjs.com/cli/v7/using-npm/scripts#best-practices) and [Yarn](https://yarnpkg.com/advanced/lifecycle-scripts#a-note-about-postinstall) best practices regarding autoinstall
13
+
- Follows [npm](https://docs.npmjs.com/cli/v8/using-npm/scripts#best-practices) and [Yarn](https://yarnpkg.com/advanced/lifecycle-scripts#a-note-about-postinstall) best practices regarding autoinstall
14
14
- User-friendly messages
15
15
- Optional install
16
16
-__Like husky 4, supports__
@@ -21,7 +21,7 @@ You can use it to **lint your commit messages**, **run tests**, **lint code**, e
@@ -54,7 +54,7 @@ The new husky is used by these awesome projects:
54
54
55
55
# Usage
56
56
57
-
Already using husky? See [Migrate from 4 to 7](/?id=migrate-from-v4-to-v7).
57
+
Already using husky? See [Migrate from 4 to 8](/?id=migrate-from-v4-to-v8).
58
58
59
59
## Automatic (recommended)
60
60
@@ -63,7 +63,7 @@ Already using husky? See [Migrate from 4 to 7](/?id=migrate-from-v4-to-v7).
63
63
```shell
64
64
npx husky-init && npm install # npm
65
65
npx husky-init && yarn # Yarn 1
66
-
yarn dlx husky-init --yarn2 && yarn # Yarn 2
66
+
yarn dlx husky-init --yarn2 && yarn # Yarn 2+
67
67
pnpm dlx husky-init && pnpm install # pnpm
68
68
```
69
69
@@ -112,7 +112,7 @@ You should have:
112
112
}
113
113
```
114
114
115
-
!> **Yarn 2 doesn't support `prepare` lifecycle script, so husky needs to be installed differently (this doesn't apply to Yarn 1 though). See [Yarn 2 install](/?id=yarn-2).**
115
+
!> **Yarn 2+ doesn't support `prepare` lifecycle script, so husky needs to be installed differently (this doesn't apply to Yarn 1 though). See [Yarn 2+ install](/?id=yarn-2).**
116
116
117
117
### Create a hook
118
118
@@ -290,7 +290,7 @@ Or make `prepare` script fail silently if husky is not installed:
290
290
291
291
### With env variables
292
292
293
-
You can set `HUSKY` environment variable to `0` in your CI config file, to disable all hooks.
293
+
You can set `HUSKY` environment variable to `0` in your CI config file, to disable hooks installation.
294
294
295
295
Alternatively, most Continuous Integration Servers set a `CI` environment variable. You can use it in your hooks to detect if it's running in a CI.
296
296
@@ -417,16 +417,16 @@ yarn ...
417
417
418
418
Environment variables:
419
419
420
-
-`HUSKY_SKIP_HOOKS`becomes`HUSKY`.
421
-
-`HUSKY_SKIP_INSTALL` is removed.
420
+
-`HUSKY_SKIP_HOOKS`is replaced by`HUSKY`.
421
+
-`HUSKY_SKIP_INSTALL` is replaced by `HUSKY`.
422
422
-`HUSKY_GIT_PARAMS` is removed. Instead Git parameters should be used directly in scripts (e.g. `$1`).
423
423
-`PATH` for locally installed tools is not automatically set anymore. You'll need to use your package manager to run them.
424
424
425
-
# Migrate from v4 to v7
425
+
# Migrate from v4 to v8
426
426
427
-
## husky-4-to-7 CLI
427
+
## husky-4-to-8 CLI
428
428
429
-
See [husky-4-to-7](https://github.com/typicode/husky-4-to-7) CLI to quickly migrate from v4 to v7.
429
+
See [husky-4-to-8](https://github.com/typicode/husky-4-to-8) CLI to quickly migrate from v4 to v8.
430
430
431
431
## Package scripts
432
432
@@ -442,7 +442,7 @@ If you were calling `package.json` scripts using `npm` or `yarn`, **you can simp
442
442
```
443
443
444
444
```shell
445
-
# .husky/pre-commit (v7)
445
+
# .husky/pre-commit (v8)
446
446
# ...
447
447
npm test
448
448
npm run foo
@@ -462,7 +462,7 @@ If you were calling directly locally installed binaries, **you need to run them
462
462
```
463
463
464
464
```shell
465
-
# .husky/pre-commit (v7)
465
+
# .husky/pre-commit (v8)
466
466
# ...
467
467
npx --no jest
468
468
# or
@@ -483,7 +483,7 @@ Previous `HUSKY_GIT_PARAMS` environment variable is replaced by native params `$
0 commit comments