ghooks-org/ghooks

Hook, line and husky

Opened this issue · 3 comments

#166 deprecated ghooks in favor of husky. Husky used an opinionated approach to managing hooks using the scripts object in the manifest instead of config which causes:

  • All those migrating must change their package manifest
  • All those migrating must use scripts to define their hooks

I opened a issue in Husky requesting backwards compatibility and it sat for 20 days without response. Here's the issue, which contains some additional info and justification for not using scripts: typicode/husky#133.

The purpose of this issue is to revive ghooks from deprecation. Initial thoughts are:

  • Create a 2.1 release which allows users to define hooks config in a pkg.ghooks object at the root of the package manifest with full backwards compatibility with the pkg.config.gooks object. The pkg.[package] approach is used by libraries such as Standard JS as config is typically reserved for NPM use (though it's sometimes used by other packages).
  • A more radical idea is to fork Husky, create ghooks 3.0 with backwards compatibility with the benefits of whatever Husky is providing which makes others want to use it over ghooks.

/cc @duclet @ta2edchimp @gtramontina @kentcdodds for thoughts

Heard back from Husky maintainer and added some additional considerations for them as to what I believe will happen under the husky design: typicode/husky#133 (comment)

Seems like the next logical steps are to:

  • Vet the CI process and ensure it's still functional.
  • Prepare a 2.1 with at least one feature and remove the deprecation notice.

Regarding the pkg.ghooks config object, we maybe could use my old PR #81 as a starting point.

Closing this in favor of smaller, more well defined tasks.