From e46422de6abdce5c7dba2e681da5de5df812195d Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Thu, 20 May 2021 13:36:46 -0700 Subject: [PATCH] fix: update husky usage --- .husky/.gitignore | 1 + .husky/pre-commit | 4 ++++ .husky/pre-push | 4 ++++ package.json | 8 +------- 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/pre-commit create mode 100755 .husky/pre-push diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 000000000000..31354ec13899 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000000..7c142f8f5004 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +node script/prevent-translation-commits.js diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 000000000000..c3e157d88be1 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run prevent-pushes-to-main diff --git a/package.json b/package.json index ca3257f47cd0..3dc38560e8ce 100644 --- a/package.json +++ b/package.json @@ -209,11 +209,5 @@ "engines": { "node": ">= 16.0.0" }, - "repository": "https://github.com/github/docs", - "husky": { - "hooks": { - "pre-commit": "node script/prevent-translation-commits.js", - "pre-push": "npm run prevent-pushes-to-main" - } - } + "repository": "https://github.com/github/docs" }