Skip to content

Commit

Permalink
Update install script for husky v9 (#16000)
Browse files Browse the repository at this point in the history
Co-authored-by: fisker Cheung <lionkay@gmail.com>
  • Loading branch information
ohaddahan and fisker committed Feb 3, 2024
1 parent 6d0b1d2 commit 08f1940
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions docs/install.md
Expand Up @@ -121,18 +121,16 @@ For example, you can do the following to have Prettier run before each commit:

```bash
npm install --save-dev husky lint-staged
npx husky install
npm pkg set scripts.prepare="husky install"
npx husky add .husky/pre-commit "npx lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
```

<!--yarn-->

```bash
yarn add --dev husky lint-staged
npx husky install
npm pkg set scripts.prepare="husky install"
npx husky add .husky/pre-commit "npx lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','npx lint-staged\n')"
```

> If you use Yarn 2, see https://typicode.github.io/husky/#/?id=yarn-2
Expand All @@ -141,9 +139,8 @@ For example, you can do the following to have Prettier run before each commit:

```bash
pnpm add --save-dev husky lint-staged
pnpm exec husky install
npm pkg set scripts.prepare="husky install"
pnpm exec husky add .husky/pre-commit "pnpm exec lint-staged"
npx husky init
node --eval "fs.writeFileSync('.husky/pre-commit','pnpm exec lint-staged\n')"
```

<!--END_DOCUSAURUS_CODE_TABS-->
Expand Down

0 comments on commit 08f1940

Please sign in to comment.