Skip to content

Commit eeca77a

Browse files
authored
docs: adjust package managers CLI instructions for both Win and Unix based systems (#4381) (#4382)
* docs: fix JSON syntax * docs: adjust package managers CLI instructions for both Win and Unix based systems (#4381) * docs: fix CLI instruction not compatible to Windows * docs: adjust markdown
1 parent b05f66a commit eeca77a

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

docs/guides/getting-started.md

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,19 @@ Install `@commitlint/cli` and a `@commitlint/config-*` / `commitlint-config-*` o
77
::: code-group
88

99
```sh [npm]
10-
npm install --save-dev @commitlint/{cli,config-conventional}
10+
npm install -D @commitlint/cli @commitlint/config-conventional
1111
```
1212

1313
```sh [yarn]
14-
yarn add --dev @commitlint/{cli,config-conventional}
15-
```
16-
17-
```sh [npm (Windows)]
18-
npm install --save-dev @commitlint/config-conventional @commitlint/cli
14+
yarn add -D @commitlint/cli @commitlint/config-conventional
1915
```
2016

2117
```sh [pnpm]
22-
pnpm add --save-dev @commitlint/{cli,config-conventional}
18+
pnpm add -D @commitlint/cli @commitlint/config-conventional
2319
```
2420

2521
```sh [deno]
26-
deno add --dev npm:@commitlint/cli npm:@commitlint/config-conventional
22+
deno add -D npm:@commitlint/cli npm:@commitlint/config-conventional
2723
```
2824

2925
:::

docs/guides/use-prompt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
3. Install and configure if needed
2020

2121
```sh
22-
npm install --save-dev @commitlint/{cli,config-conventional,prompt-cli}
22+
npm install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli
2323

2424
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
2525
```

docs/reference/examples.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@ These examples show common usages of how commitlint can be configured.
77
::: code-group
88

99
```jsonc [package.json]
10+
{
1011
// ...
11-
commitlint: {
12+
"commitlint": {
1213
"rules": {
13-
"references-empty": [2, "never"]
14+
"references-empty": [2, "never"],
1415
},
1516
"parserPreset": {
1617
"parserOpts": {
17-
"issuePrefixes": ["PROJ-"]
18-
}
19-
}
20-
}
18+
"issuePrefixes": ["PROJ-"],
19+
},
20+
},
21+
},
2122
// ...
23+
}
2224
```

0 commit comments

Comments
 (0)