Skip to content

Commit

Permalink
docs: 📝 add pnpm to the getting started and local setup guides (#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
VoloshchenkoAl committed Apr 23, 2024
1 parent 9c9f732 commit ae99d6a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ yarn add --dev @commitlint/{cli,config-conventional}
npm install --save-dev @commitlint/config-conventional @commitlint/cli
```

```sh [pnpm]
pnpm add --save-dev @commitlint/{cli,config-conventional}
```

:::

## Configuration
Expand Down
18 changes: 18 additions & 0 deletions docs/guides/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ echo "yarn commitlint \${1}" > .husky/commit-msg
> [!WARNING]
> Please note that currently @commitlint/cli doesn't support yarn v2 Plug'n'Play (using yarn > v2 with `nodeLinker: node-modules` in your .yarnrc.yml file may work sometimes)
== pnpm

```sh
pnpm add --save-dev husky

pnpm husky init

# Add commit message linting to commit-msg hook
echo "pnpm dlx commitlint --edit \$1" > .husky/commit-msg
```

As an alternative you can create a script inside `package.json`

```sh
npm pkg set scripts.commitlint="commitlint --edit"
echo "pnpm commitlint \${1}" > .husky/commit-msg
```

:::

---
Expand Down

0 comments on commit ae99d6a

Please sign in to comment.