From a1a8491f079de4dcf581697d4660c7bc308e2643 Mon Sep 17 00:00:00 2001 From: scripthunter7 <57285466+scripthunter7@users.noreply.github.com> Date: Mon, 20 Feb 2023 08:21:46 +0100 Subject: [PATCH] Add Husky --- .husky/pre-commit | 4 ++++ package.json | 2 ++ yarn.lock | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..bfc028b --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn test diff --git a/package.json b/package.json index 82ac41d..ca54521 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,13 @@ "@rollup/plugin-commonjs": "^24.0.0", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-terser": "^0.2.1", + "husky": "^8.0.0", "jest": "^29.3.1", "rollup": "^3.8.1", "rollup-plugin-node-externals": "^5.0.3" }, "scripts": { + "prepare": "husky install", "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js", "build": "yarn rollup --config rollup.config.js" } diff --git a/yarn.lock b/yarn.lock index 1625854..ba821bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1929,6 +1929,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +husky@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== + import-local@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"