From 798bba92e75413dd0fffeea3d8f408bb512ec59b Mon Sep 17 00:00:00 2001 From: Fauzan Date: Thu, 9 Dec 2021 17:05:29 +0700 Subject: [PATCH 1/3] fix(docs): missing for windows command sync with README.md --- docs/guides-local-setup.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guides-local-setup.md b/docs/guides-local-setup.md index 968e141814..169f13fafd 100644 --- a/docs/guides-local-setup.md +++ b/docs/guides-local-setup.md @@ -12,6 +12,10 @@ configure `commitlint` to use it. ```bash # Install and configure if needed npm install --save-dev @commitlint/{cli,config-conventional} +# For Windows: +npm install --save-dev @commitlint/config-conventional @commitlint/cli + +# Configure commitlint to use conventional config echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js ``` From 67d353d5203c578727859ba924e33210e241b378 Mon Sep 17 00:00:00 2001 From: Fauzan Date: Thu, 9 Dec 2021 17:10:06 +0700 Subject: [PATCH 2/3] docs: add missing add hook alternative --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9031892ff5..0bacebb14d 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,8 @@ yarn husky install # Add hook npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"' +# or +yarn husky add .husky/commit-msg 'yarn commitlint --edit $1' ``` Check the [husky documentation](https://typicode.github.io/husky/#/?id=manual) on how you can automatically have Git hooks enabled after install for different `yarn` versions. From a271ef32ef2c71add9ea4260d1a099435b18aa9e Mon Sep 17 00:00:00 2001 From: Fauzan Date: Fri, 10 Dec 2021 09:28:00 +0700 Subject: [PATCH 3/3] docs: add other add hooks commands add hooks produce different result in different command interpreter --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 0bacebb14d..237088d6b4 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,13 @@ yarn husky install # Add hook npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"' +# Sometimes above command doesn't work in some command interpreters +# You can try other commands below to write npx --no -- commitlint --edit $1 +# in the commit-msg file. +npx husky add .husky/commit-msg \"npx --no -- commitlint --edit '$1'\" +# or +npx husky add .husky/commit-msg "npx --no -- commitlint --edit $1" + # or yarn husky add .husky/commit-msg 'yarn commitlint --edit $1' ```