From 66059b45c603048a7d3cf37f5d01c79545ac5860 Mon Sep 17 00:00:00 2001 From: Cat Chen Date: Thu, 13 Jun 2024 23:37:16 +0000 Subject: [PATCH] Ran Prettier with XML plugin against SVG (#2846) --- .prettierrc.json | 6 +++++- assets/icon.svg | 21 ++++++++++++++++++++- assets/inner-icon.svg | 16 +++++++++++++++- package.json | 6 ++++-- yarn.lock | 28 +++++++++++++++++++++++++++- 5 files changed, 71 insertions(+), 6 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index edc5d6ac..b4eb9432 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -18,5 +18,9 @@ "importOrderSortIndividualImports": true, "importOrderMergeDuplicateImports": true, "importOrderBuiltinModulesToTop": true, - "importOrderTypeImportsToTop": true + "importOrderTypeImportsToTop": true, + "plugins": [ + "@prettier/plugin-xml", + "@serverless-guru/prettier-plugin-import-order" + ] } diff --git a/assets/icon.svg b/assets/icon.svg index f60cb8d5..3869f70d 100644 --- a/assets/icon.svg +++ b/assets/icon.svg @@ -1 +1,20 @@ - \ No newline at end of file + + + + + + + + diff --git a/assets/inner-icon.svg b/assets/inner-icon.svg index 53ae2bc4..f399f4c5 100644 --- a/assets/inner-icon.svg +++ b/assets/inner-icon.svg @@ -1 +1,15 @@ - \ No newline at end of file + + + + + + diff --git a/package.json b/package.json index 0384efa5..8b731ade 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "homepage": "https://github.com/CatChen/accept-to-ship-action#readme", "funding": "https://github.com/CatChen/accept-to-ship-action?sponsor=1", "devDependencies": { + "@prettier/plugin-xml": "^3.4.1", "@serverless-guru/prettier-plugin-import-order": "^0.4.1", "@types/node": "^20.1.0", "@typescript-eslint/eslint-plugin": "^7.10.0", @@ -34,7 +35,7 @@ "eslint-plugin-prettier": "^5.0.0", "husky": "^9.0.11", "lint-staged": "^15.2.5", - "prettier": "^3.0.2", + "prettier": "^3.3.2", "typescript": "^5.0.2", "typescript-eslint": "^7.10.0" }, @@ -49,6 +50,7 @@ "*.(ts,js)": "yarn lint --fix", "*.json": "yarn prettier -w", "*.(yml,yaml)": "yarn prettier -w", - "*.(md,markdown)": "yarn prettier -w" + "*.(md,markdown)": "yarn prettier -w", + "*.(svg)": "yarn prettier -w" } } diff --git a/yarn.lock b/yarn.lock index 3feea44c..9295ef12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -551,6 +551,13 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== +"@prettier/plugin-xml@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@prettier/plugin-xml/-/plugin-xml-3.4.1.tgz#6c3be1184871a983d08c9f81c8a8796f62a19568" + integrity sha512-Uf/6/+9ez6z/IvZErgobZ2G9n1ybxF5BhCd7eMcKqfoWuOzzNUxBipNo3QAP8kRC1VD18TIo84no7LhqtyDcTg== + dependencies: + "@xml-tools/parser" "^1.0.11" + "@serverless-guru/prettier-plugin-import-order@^0.4.1": version "0.4.2" resolved "https://registry.yarnpkg.com/@serverless-guru/prettier-plugin-import-order/-/prettier-plugin-import-order-0.4.2.tgz#425e4cdbdd819cadb97786db309d9ac1ea1b4313" @@ -658,6 +665,13 @@ resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.38.1.tgz#13f08738111e1d9e8a22fd6141f3590e54d9a60e" integrity sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw== +"@xml-tools/parser@^1.0.11": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@xml-tools/parser/-/parser-1.0.11.tgz#a118a14099ea5c3c537e4781fad2fc195b57f8ff" + integrity sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA== + dependencies: + chevrotain "7.1.1" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" @@ -801,6 +815,13 @@ chalk@~5.3.0: resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== +chevrotain@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-7.1.1.tgz#5122814eafd1585a9601f9180a7be9c42d5699c6" + integrity sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw== + dependencies: + regexp-to-ast "0.5.0" + cli-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" @@ -1548,7 +1569,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.2: +prettier@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== @@ -1563,6 +1584,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +regexp-to-ast@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz#56c73856bee5e1fef7f73a00f1473452ab712a24" + integrity sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"