From 59d824ebf85f9b66a0a5a6a6d8913a1813a76b09 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Sun, 14 Jan 2024 21:14:00 +0100 Subject: [PATCH] Do not run prettier with pre-commit (#3196) To fix issues with https://github.com/woodpecker-ci/woodpecker/pull/3190 Prettier still runs at woodpecker. Also fix the duplication in our CI. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- .prettierignore | 8 +++++--- .woodpecker/test.yaml | 9 +++++++-- web/.prettierignore | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 993882dcb..28bdf556b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,5 +54,5 @@ ci: autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' autoupdate_schedule: monthly # NB: hadolint not included in pre-commit.ci - skip: [check-hooks-apply, check-useless-excludes, hadolint] + skip: [check-hooks-apply, check-useless-excludes, hadolint, prettier] submodules: false diff --git a/.prettierignore b/.prettierignore index beaa85f06..f1549c906 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,10 @@ -pnpm-lock.yaml build/ docs/versioned_docs/ docs/.docusaurus/ +docs/pnpm-lock.yaml dist/ -web/components.d.ts CHANGELOG.md -web/src/assets/dayjsLocales/ + +# web/ must be directly formatted from there +# to prevent conflicts with different prettier version +web/ diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index 3423f58ff..77f2fb3bf 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -71,7 +71,9 @@ steps: lint-editorconfig: image: docker.io/mstruebing/editorconfig-checker:2.7.2 when: - event: pull_request + - event: pull_request + - event: push + branch: renovate/* lint-license-header: image: *golang_image @@ -82,7 +84,10 @@ steps: prettier: image: docker.io/woodpeckerci/plugin-prettier:next - when: *when + when: + - event: pull_request + - event: push + branch: renovate/* test: depends_on: diff --git a/web/.prettierignore b/web/.prettierignore index 894191488..203898907 100644 --- a/web/.prettierignore +++ b/web/.prettierignore @@ -4,5 +4,5 @@ coverage/ LICENSE components.d.ts src/assets/locales/*.json -src/assets/timeAgoLocales/ +src/assets/dayjsLocales/ !src/assets/locales/en.json