From e311ede3afba6f098ee2dd1feb64322a4ca59bb9 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Wed, 23 Oct 2024 20:36:54 +0200 Subject: [PATCH] Feature/Optimize pre-commit hook by linting only affected projects (#3973) * Optimize pre-commit hook by linting only affected projects * Update changelog --------- Signed-off-by: Dominik Willner --- .husky/pre-commit | 2 +- CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 4bf77522a..b82bf440f 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,6 +1,6 @@ # Run linting and stop the commit process if any errors are found # --quiet suppresses warnings (temporary until all warnings are fixed) -npm run lint --quiet || exit 1 +npm run affected:lint --base=main --head=HEAD --parallel=2 --quiet || exit 1 # Check formatting on modified and uncommitted files, stop the commit if issues are found npm run format:check --uncommitted || exit 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index fcdf3dc6d..0064d7c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the font colors of the chart of the holdings tab on the home page (experimental) - Optimized the dialog sizes for mobile (full screen) +- Optimized the git-hook via `husky` to lint only affected projects before a commit - Upgraded `angular` from version `18.1.1` to `18.2.8` - Upgraded `Nx` from version `19.5.6` to `20.0.3`