Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae99d6a

Browse files
docs: 📝 add pnpm to the getting started and local setup guides (conventional-changelog#4041)
1 parent 9c9f732 commit ae99d6a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

‎docs/guides/getting-started.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ yarn add --dev @commitlint/{cli,config-conventional}
1818
npm install --save-dev @commitlint/config-conventional @commitlint/cli
1919
```
2020

21+
```sh [pnpm]
22+
pnpm add --save-dev @commitlint/{cli,config-conventional}
23+
```
24+
2125
:::
2226

2327
## Configuration

‎docs/guides/local-setup.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,24 @@ echo "yarn commitlint \${1}" > .husky/commit-msg
6262
> [!WARNING]
6363
> 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)
6464
65+
== pnpm
66+
67+
```sh
68+
pnpm add --save-dev husky
69+
70+
pnpm husky init
71+
72+
# Add commit message linting to commit-msg hook
73+
echo "pnpm dlx commitlint --edit \$1" > .husky/commit-msg
74+
```
75+
76+
As an alternative you can create a script inside `package.json`
77+
78+
```sh
79+
npm pkg set scripts.commitlint="commitlint --edit"
80+
echo "pnpm commitlint \${1}" > .husky/commit-msg
81+
```
82+
6583
:::
6684

6785
---

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /