diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 39aa13031e..0000000000 --- a/.husky/pre-commit +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - -npx lint-staged --cwd ./frontend diff --git a/Makefile b/Makefile index 1cfd243d91..36e3e7cdc9 100644 --- a/Makefile +++ b/Makefile @@ -221,4 +221,7 @@ logs-db: # ALIASES +.PHONY: dev lint-back + dev: dev-run-back-with-infra +lint-back: dev-lint-backend diff --git a/backend/pom.xml b/backend/pom.xml index 1ef86532e8..e2c3f149d4 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -407,7 +407,7 @@ com.pinterest ktlint - 0.48.2 + 0.50.0 diff --git a/frontend/.husky/pre-commit b/frontend/.husky/pre-commit index f22ecd59da..7f08961566 100755 --- a/frontend/.husky/pre-commit +++ b/frontend/.husky/pre-commit @@ -3,4 +3,12 @@ [ -n "$CI" ] && exit 0 +case "$PWD" in + *"/frontend"*) + echo "Error: You must stage & commit from the workspace root directory." + exit 1 + ;; +esac + +make lint-back npx lint-staged --cwd ./frontend