Skip to content

fix: suppress huskyrc warning when init exists#1638

Open
puneetdixit200 wants to merge 1 commit into
typicode:mainfrom
puneetdixit200:fix-huskyrc-init-precedence
Open

fix: suppress huskyrc warning when init exists#1638
puneetdixit200 wants to merge 1 commit into
typicode:mainfrom
puneetdixit200:fix-huskyrc-init-precedence

Conversation

@puneetdixit200

Copy link
Copy Markdown

Fixes #1606.

Summary

  • source the modern init.sh file before considering the deprecated ~/.huskyrc warning
  • keep the legacy warning when only ~/.huskyrc is present
  • add a regression shell test for init-file precedence

Tests

  • npm_config_cache=$PWD/.npm-cache npm pack >/tmp/husky-pack.log && mv husky-*.tgz /tmp/husky.tgz && sh test/13_huskyrc_precedence.sh
  • npm_config_cache=$PWD/.npm-cache ./test.sh
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.huskyrc deprecation notice shows even if I have a ~/.config/husky/init.sh file.

1 participant