From e7acc2fb3a5bbf257f850d5923364aacac94cf49 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau Date: Wed, 12 Feb 2020 22:31:17 +0100 Subject: [PATCH 1/2] fix: husky.config.js not .huskyrc.config.js in [readme](https://github.com/typicode/husky/blob/master/README.md#upgrading-from-014) it says: > Starting with 1.0.0, husky can be configured using .huskyrc, .huskyrc.json, .huskyrc.js or husky.config.js file. --- sh/husky.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/husky.sh b/sh/husky.sh index aabf9fe76..76671e926 100644 --- a/sh/husky.sh +++ b/sh/husky.sh @@ -58,7 +58,7 @@ debug "Current working directory is $(pwd)" # Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could # fail due to the dynamic aspect of JS. For example: # `"pre-" + "commit"` or `require('./config/hooks')`) -if [ ! -f .huskyrc.js ] && [ ! -f .huskyrc.config.js ] && ! hookIsDefined; then +if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then debug "$hookName config not found, skipping hook" exit 0 fi From 3793591bf848fbc728ac197513d50176291bba1b Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau Date: Wed, 12 Feb 2020 22:39:24 +0100 Subject: [PATCH 2/2] update snapshot --- src/installer/__tests__/__snapshots__/scripts.ts.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/installer/__tests__/__snapshots__/scripts.ts.snap b/src/installer/__tests__/__snapshots__/scripts.ts.snap index a8f1bb3fb..400d31178 100644 --- a/src/installer/__tests__/__snapshots__/scripts.ts.snap +++ b/src/installer/__tests__/__snapshots__/scripts.ts.snap @@ -87,7 +87,7 @@ debug \\"Current working directory is $(pwd)\\" # Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could # fail due to the dynamic aspect of JS. For example: # \`\\"pre-\\" + \\"commit\\"\` or \`require('./config/hooks')\`) -if [ ! -f .huskyrc.js ] && [ ! -f .huskyrc.config.js ] && ! hookIsDefined; then +if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then debug \\"$hookName config not found, skipping hook\\" exit 0 fi