Skip to content

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

Description

@simon-abbott

I work in a bunch of different projects, some of which are updated to the latest version of husky, and some which are not yet. In order to accommodate this, I have a ~/.config/husky/init.sh, and I made .huskyrc a symlink to it. This way both new and old husky versions are able to load the init script properly. This all works, but every time I run husky it complains that '~/.huskyrc' is DEPRECATED. I would expect this warning to not appear if ~/.config/husky/init.sh exists.

Specifically I would expect the flow for modern husky to be (in pseudocode):

if exists(~/.config/husky/init.sh):
  run ~/.config/husky/init.sh
else if exists (~/.huskyrc):
  print deprecation warning
  run ~/.huskyrc
else
  // do nothing
end

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions