diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..726a240 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,2 @@ +#!/bin/sh +cd ui && npx lint-staged diff --git a/ui/package.json b/ui/package.json index 027e7db..093e4d6 100644 --- a/ui/package.json +++ b/ui/package.json @@ -12,8 +12,8 @@ "lint": "npm run type-check && npm run eslint && npm run stylelint", "format": "npm run eslint -- --fix", "format:scss": "npm run stylelint -- --fix", - "precommit": "lint-staged", - "postcommit": "git update-index --again" + "prepare": "cd .. && husky install", + "precommit": "lint-staged" }, "author": "", "license": "Apache-2.0", @@ -78,10 +78,7 @@ "npm": ">=10.2.4" }, "lint-staged": { - "*.{ts,tsx}": [ - "eslint --fix", - "git add" - ], + "*.{ts,tsx}": ["eslint --fix"], "*.scss": [ "stylelint --fix", "prettier --write"