From fab3ee9608d3cd6529d97f2b6d6a57047943e660 Mon Sep 17 00:00:00 2001 From: Majorfi Date: Wed, 4 Oct 2023 14:22:49 +0200 Subject: [PATCH] feat: 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 000000000..d24fdfc60 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index 72d32f3e7..64dc22ac3 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "prettier": "prettier --check \"./**/**/*.{json,js,ts,tsx,scss}\"", "prettier-format": "prettier --config .prettierrc \"./**/**/*.{json,js,ts,tsx,scss,md}\" --write", "bump": "bump", + "prepare": "husky install", "test": "vitest run" }, "dependencies": { @@ -73,6 +74,7 @@ "eslint-plugin-simple-import-sort": "^10.0.0", "eslint-plugin-tailwindcss": "^3.13.0", "eslint-plugin-unused-imports": "^3.0.0", + "husky": "^8.0.3", "lint-staged": "^14.0.1", "next-transpile-modules": "^10.0.1", "postcss": "^8.4.31", diff --git a/yarn.lock b/yarn.lock index f09aab449..b9a7bda84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6237,6 +6237,11 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" +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== + iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"