From 7f6396b95ec29bbca8a21fca0e8e9334df391901 Mon Sep 17 00:00:00 2001 From: ricki-jay-wmde Date: Tue, 29 Apr 2025 11:49:32 +0200 Subject: [PATCH 1/3] Check Prettier --- lint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lint.sh b/lint.sh index a6f48511e..b5da9dc27 100755 --- a/lint.sh +++ b/lint.sh @@ -76,6 +76,12 @@ if $fix; then find "$path" -path "$path/node_modules" -prune -o -name '*.py' -print0 | xargs -0 -r \ python3 -m black --quiet else + if $prettier; then + echo "ℹ️ Running Prettier (without --write) on Markdown and YAML files" + prettier "$path/**/*.md" --log-level error --config .prettierrc.json + prettier "$path/**/*.{yml,yaml}" --log-level error --config .prettierrc.json + fi + echo "ℹ️ Running ESLint (without --fix)" eslint "$path" eslint "$path/**/**" --no-eslintrc --config .eslintrc-whitespace.json From 2640048b196ad9a39f0863e4dcd09f0c0c3389ae Mon Sep 17 00:00:00 2001 From: ricki-jay-wmde Date: Tue, 29 Apr 2025 11:49:53 +0200 Subject: [PATCH 2/3] Run Prettier Check --- .github/workflows/_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_build_and_test.yml b/.github/workflows/_build_and_test.yml index 81d2c7b86..d0ab1c568 100644 --- a/.github/workflows/_build_and_test.yml +++ b/.github/workflows/_build_and_test.yml @@ -32,7 +32,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} dockerhub_token: ${{ secrets.WBS_PUBLISH_TOKEN }} - - run: ./nx lint + - run: ./nx lint --prettier build: needs: From 162b9ee6088dd60d10ac411cfaff3bb29dc8917c Mon Sep 17 00:00:00 2001 From: ricki-jay-wmde Date: Tue, 29 Apr 2025 11:53:46 +0200 Subject: [PATCH 3/3] Check --- lint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lint.sh b/lint.sh index b5da9dc27..1aca7cd4e 100755 --- a/lint.sh +++ b/lint.sh @@ -78,8 +78,8 @@ if $fix; then else if $prettier; then echo "ℹ️ Running Prettier (without --write) on Markdown and YAML files" - prettier "$path/**/*.md" --log-level error --config .prettierrc.json - prettier "$path/**/*.{yml,yaml}" --log-level error --config .prettierrc.json + prettier "$path/**/*.md" --log-level error --config .prettierrc.json --check + prettier "$path/**/*.{yml,yaml}" --log-level error --config .prettierrc.json --check fi echo "ℹ️ Running ESLint (without --fix)"