From 406c8482c6bd9711a1597eb225fe3157227d168f Mon Sep 17 00:00:00 2001 From: juliolmuller Date: Fri, 25 Apr 2025 15:47:43 -0300 Subject: [PATCH 1/4] docs: fix JSON syntax --- docs/reference/examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/reference/examples.md b/docs/reference/examples.md index 3832adbb1f..78baf852c8 100644 --- a/docs/reference/examples.md +++ b/docs/reference/examples.md @@ -7,8 +7,9 @@ These examples show common usages of how commitlint can be configured. ::: code-group ```jsonc [package.json] +{ // ... - commitlint: { + "commitlint": { "rules": { "references-empty": [2, "never"] }, @@ -19,4 +20,5 @@ These examples show common usages of how commitlint can be configured. } } // ... +} ``` From f91856a204ec20f136737e428dbdd183186f1b8f Mon Sep 17 00:00:00 2001 From: juliolmuller Date: Fri, 25 Apr 2025 15:49:40 -0300 Subject: [PATCH 2/4] docs: adjust package managers CLI instructions for both Win and Unix based systems (#4381) --- docs/guides/getting-started.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/guides/getting-started.md b/docs/guides/getting-started.md index f701a63cfb..74ca73872b 100644 --- a/docs/guides/getting-started.md +++ b/docs/guides/getting-started.md @@ -7,23 +7,19 @@ Install `@commitlint/cli` and a `@commitlint/config-*` / `commitlint-config-*` o ::: code-group ```sh [npm] -npm install --save-dev @commitlint/{cli,config-conventional} +npm install -D @commitlint/cli @commitlint/config-conventional ``` ```sh [yarn] -yarn add --dev @commitlint/{cli,config-conventional} -``` - -```sh [npm (Windows)] -npm install --save-dev @commitlint/config-conventional @commitlint/cli +yarn add -D @commitlint/cli @commitlint/config-conventional ``` ```sh [pnpm] -pnpm add --save-dev @commitlint/{cli,config-conventional} +pnpm add -D @commitlint/cli @commitlint/config-conventional ``` ```sh [deno] -deno add --dev npm:@commitlint/cli npm:@commitlint/config-conventional +deno add -D npm:@commitlint/cli npm:@commitlint/config-conventional ``` ::: From 229acc4a28773c6dde5d7463c93a5c02339b604d Mon Sep 17 00:00:00 2001 From: juliolmuller Date: Fri, 25 Apr 2025 15:54:44 -0300 Subject: [PATCH 3/4] docs: fix CLI instruction not compatible to Windows --- docs/guides/use-prompt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/use-prompt.md b/docs/guides/use-prompt.md index cd1bdda4d5..4c587ece12 100644 --- a/docs/guides/use-prompt.md +++ b/docs/guides/use-prompt.md @@ -19,7 +19,7 @@ 3. Install and configure if needed ```sh - npm install --save-dev @commitlint/{cli,config-conventional,prompt-cli} + npm install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js ``` From 0aea85a5612d8b47fe953d936269e281e77728b5 Mon Sep 17 00:00:00 2001 From: juliolmuller Date: Mon, 28 Apr 2025 23:55:00 -0300 Subject: [PATCH 4/4] docs: adjust markdown --- docs/reference/examples.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/examples.md b/docs/reference/examples.md index 78baf852c8..773b4048ab 100644 --- a/docs/reference/examples.md +++ b/docs/reference/examples.md @@ -11,14 +11,14 @@ These examples show common usages of how commitlint can be configured. // ... "commitlint": { "rules": { - "references-empty": [2, "never"] + "references-empty": [2, "never"], }, "parserPreset": { "parserOpts": { - "issuePrefixes": ["PROJ-"] - } - } - } + "issuePrefixes": ["PROJ-"], + }, + }, + }, // ... } ```