diff --git a/.hooks/commit-msg b/.hooks/commit-msg new file mode 100755 index 0000000..1e5b0d3 --- /dev/null +++ b/.hooks/commit-msg @@ -0,0 +1,2 @@ +#!/bin/sh +npx --no-install commitlint --edit ${1} diff --git a/.hooks/pre-commit b/.hooks/pre-commit new file mode 100755 index 0000000..8995bac --- /dev/null +++ b/.hooks/pre-commit @@ -0,0 +1,2 @@ +#!/bin/sh +npx --no-install lint-staged --concurrent false && npm run type-check diff --git a/package-lock.json b/package-lock.json index 53a003a..e4ea870 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,6 @@ "postcss-nesting": "^12.1.2", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.3.0", - "simple-git-hooks": "^2.11.1", "svgo-loader": "^4.0.0", "tailwindcss": "^3.4.3", "typescript": "^5.4.5", @@ -9999,16 +9998,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/simple-git-hooks": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.11.1.tgz", - "integrity": "sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "simple-git-hooks": "cli.js" - } - }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", diff --git a/package.json b/package.json index d48a8a3..69f4241 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ "lint:md": "markdownlint --ignore-path .gitignore . --config ./markdownlint-config.js", "lint:md:fix": "markdownlint --fix --ignore-path .gitignore . --config ./markdownlint-config.js", "format": "prettier --write \"**/*.{css,js,jsx,ts,tsx,json}\"", - "update-git-hooks": "npx simple-git-hooks", - "prepare": "npm run update-git-hooks" + "prepare": "git config core.hooksPath .hooks" }, "dependencies": { "framer-motion": "^11.1.7", @@ -46,7 +45,6 @@ "postcss-nesting": "^12.1.2", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.3.0", - "simple-git-hooks": "^2.11.1", "svgo-loader": "^4.0.0", "tailwindcss": "^3.4.3", "typescript": "^5.4.5", diff --git a/simple-git-hooks.js b/simple-git-hooks.js deleted file mode 100644 index 256a5d5..0000000 --- a/simple-git-hooks.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - 'pre-commit': 'npx --no-install lint-staged --concurrent false && npm run type-check', - 'commit-msg': 'npx --no-install commitlint --edit ${1}', -};