From fbd6ec5f7db39075f68f5016d740354b6c0f9120 Mon Sep 17 00:00:00 2001 From: Connor Gilbert Date: Tue, 3 Dec 2024 21:40:51 -0800 Subject: [PATCH] ci: split Prettier job and integrate with Code Quality --- .gitlab-ci.yml | 13 ++++++++++++- package.json | 1 + yarn.lock | 22 ++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3f9fce2f2..24ba59c4bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -208,7 +208,6 @@ lint: ESLINT_CODE_QUALITY_REPORT: "gl-code-quality-report-eslint.json" script: - yarn eslint --format gitlab - - yarn prettier - yarn stylelint - yarn markdownlint - > @@ -220,6 +219,18 @@ lint: reports: codequality: gl-code-quality-report-eslint.json +prettier-lint: + extends: [.node, .yarn_install] + needs: [] + stage: test + variables: + PRETTIER_CODE_QUALITY_REPORT: "gl-code-quality-report-prettier.json" + script: + - prettier-formatter-gitlab 'yarn prettier' + artifacts: + reports: + codequality: "$PRETTIER_CODE_QUALITY_REPORT" + check_translations_dictionary: extends: [.node, '.yarn_install'] needs: [] diff --git a/package.json b/package.json index 2f2a5b2720..72a9ca79e6 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ "@storybook/vue-webpack5": "^7.6.17", "@storybook/vue3": "^7.6.20", "@storybook/vue3-webpack5": "^7.6.20", + "@studiometa/prettier-formatter-gitlab": "^2.0.0", "@types/jest-image-snapshot": "^6.4.0", "@vue/compat": "^3.2.40", "@vue/compiler-sfc": "^3.2.40", diff --git a/yarn.lock b/yarn.lock index 27a9b62d80..76657106d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3207,6 +3207,16 @@ ts-dedent "^2.0.0" type-fest "~2.19" +"@studiometa/prettier-formatter-gitlab@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@studiometa/prettier-formatter-gitlab/-/prettier-formatter-gitlab-2.0.0.tgz#75d8f71ad353842753fdd1887f21699569c6277d" + integrity sha512-k+8/D4qRUYE7a3FXGjE2vbJA9jTiZx4XvDTmdkKBxVOzDfCdfj0G2PdalFHyWOXGI64ZyB48B1jLDDWELGAQcQ== + dependencies: + chalk "^5.3.0" + jest-diff "^29.7.0" + js-yaml "^4.1.0" + prettier-linter-helpers "^1.0.0" + "@swc/core-darwin-arm64@1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.0.tgz#fdc694dd6e8543f3efea0619a6fba9ce82939205" @@ -7367,6 +7377,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -11971,6 +11986,13 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier-plugin-tailwindcss@^0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.6.5.tgz#e05202784a3f41889711ae38c75c5b8cad72f368" -- GitLab