diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000000..d2ae35e84b0 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/package.json b/package.json index 6537b2d0ea1..83d3ce9ceb7 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,8 @@ "arm64:services:stop": "docker-compose -f docker-compose.arm64.yml down", "arm64:services:clean": "docker-compose -f docker-compose.arm64.yml rm -v zookeeper kafka clickhouse", "dev:migrate:postgres": "export DEBUG=1 && source env/bin/activate && python manage.py migrate", - "dev:migrate:clickhouse": "export DEBUG=1 && source env/bin/activate && python manage.py migrate_clickhouse" + "dev:migrate:clickhouse": "export DEBUG=1 && source env/bin/activate && python manage.py migrate_clickhouse", + "prepare": "husky install" }, "dependencies": { "@babel/core": "^7.10.4", @@ -210,11 +211,6 @@ "optionalDependencies": { "fsevents": "^2.1.2" }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { "*.{js,jsx,mjs,ts,tsx,json,yaml,yml,css,scss}": "prettier --write", "(frontend/**).{js,jsx,mjs,ts,tsx}": "eslint -c .eslintrc.js --fix",