From f75b3b8188d31844f139afb5f9891a8b90c45f16 Mon Sep 17 00:00:00 2001 From: Celtian Date: Mon, 27 Jul 2026 10:21:18 +0200 Subject: [PATCH] chore(readme): husky extended --- README.md | 9 +++++++++ projects/portal/src/app/docs/content/usage.md | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index be35eb0..63ea5b4 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,15 @@ quick-commitlint "$1" Husky adds local `node_modules/.bin` commands to the hook's `PATH`, so this runs the installed Quick Commitlint development dependency. Git supplies the proposed commit-message file as `$1`. +You can also make the package-manager lookup explicit. Choose the command that matches your project: + +- npm: `npm exec --no -- quick-commitlint "$1"` +- pnpm: `pnpm exec quick-commitlint "$1"` +- Yarn: `yarn run quick-commitlint "$1"` +- Bun: `bunx --no-install quick-commitlint "$1"` + +These alternatives prefer the project-installed, lockfile-controlled version and do not download Quick Commitlint when the executable is missing. A missing installation or misspelled command therefore fails the hook instead of silently fetching a package. Using the project package manager also supports manager-specific dependency resolution, including Yarn Plug'n'Play. The bare command remains the simplest option for standard `node_modules` installations because Husky already adds local binaries to `PATH`. + Or lint a message from standard input: ```bash diff --git a/projects/portal/src/app/docs/content/usage.md b/projects/portal/src/app/docs/content/usage.md index 13ec9e1..c4dad77 100644 --- a/projects/portal/src/app/docs/content/usage.md +++ b/projects/portal/src/app/docs/content/usage.md @@ -72,6 +72,15 @@ quick-commitlint "$1" Husky adds local `node_modules/.bin` commands to the hook's `PATH`, so this runs the installed Quick Commitlint development dependency. Git supplies the proposed commit-message file as `$1`. +You can also make the package-manager lookup explicit. Choose the command that matches your project: + +- npm: `npm exec --no -- quick-commitlint "$1"` +- pnpm: `pnpm exec quick-commitlint "$1"` +- Yarn: `yarn run quick-commitlint "$1"` +- Bun: `bunx --no-install quick-commitlint "$1"` + +These alternatives prefer the project-installed, lockfile-controlled version and do not download Quick Commitlint when the executable is missing. A missing installation or misspelled command therefore fails the hook instead of silently fetching a package. Using the project package manager also supports manager-specific dependency resolution, including Yarn Plug'n'Play. The bare command remains the simplest option for standard `node_modules` installations because Husky already adds local binaries to `PATH`. + Make sure the hook file is executable when it is managed directly by Git. ## Introduce a rule gradually