From 0f7afdac3ca3cf99d544a7dfdba079f340b4fad8 Mon Sep 17 00:00:00 2001 From: JOASSART Edwin Date: Wed, 8 May 2024 08:54:22 +0200 Subject: [PATCH] patch: move husky pre-commit to .husky --- .husky/pre-commit | 4 ++++ package.json | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000000..a4f13d9b0c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npm run prettify diff --git a/package.json b/package.json index f8a2f7322b..94eca67f00 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "url": "git@github.com:balena-io/etcher.git" }, "scripts": { + "prepare": "husky install", "prettify": "prettier --write lib/**/*.css && balena-lint --fix --typescript typings lib tests forge.config.ts forge.sidecar.ts webpack.config.ts", "lint": "npm run prettify && catch-uncommitted", "test": "echo 'Only use custom tests; if you want to test locally, use `npm run wdio`' && exit 0", @@ -24,11 +25,6 @@ "wdio:e2e": "xvfb-maybe wdio run ./wdio.conf.ts --suite e2e", "wdio:ci": "xvfb-maybe wdio run ./wdio.conf.ts --suite ci" }, - "husky": { - "hooks": { - "pre-commit": "npm run prettify" - } - }, "author": "Balena Ltd. ", "license": "Apache-2.0", "dependencies": {