From 9fbed976b51196e11d6afe37d13323392bb83793 Mon Sep 17 00:00:00 2001 From: isamu Date: Sun, 18 Oct 2026 15:35:40 +0900 Subject: [PATCH 1/2] chore: add prettier with format and format:check Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pull_request.yaml | 3 +++ .prettierignore | 4 ++++ .prettierrc | 3 +++ package.json | 5 ++++- yarn.lock | 5 +++++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index e031a93..c902e22 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -51,6 +51,9 @@ jobs: - run: yarn install --frozen-lockfile --network-timeout 120000 - run: yarn run typecheck - run: yarn run lint + # Windows checkouts get CRLF line endings, which prettier reports as unformatted. + - run: yarn run format:check + if: runner.os == 'Linux' - run: yarn run build # Sanity-check `npm pack` only once (Linux + Node 24) to avoid # 6-way artifact-name collisions; lint/build coverage is what diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..2e8551b --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +.scoria/ +scoria.config.json +dist/ +coverage/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..91a3517 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "printWidth": 160 +} diff --git a/package.json b/package.json index 65320f7..5dcb620 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,9 @@ "build": "vite build && vue-tsc -p tsconfig.build.json --emitDeclarationOnly", "typecheck": "vue-tsc --noEmit", "lint": "eslint src demo", - "quality": "scoria" + "quality": "scoria", + "format": "prettier --write \"{src,demo}/**/*.{ts,tsx,vue,json,css}\" \"*.{ts,js,json}\"", + "format:check": "prettier --check \"{src,demo}/**/*.{ts,tsx,vue,json,css}\" \"*.{ts,js,json}\"" }, "peerDependencies": { "gui-chat-protocol": "^2.1.0", @@ -48,6 +50,7 @@ "eslint-plugin-vue": "^10.11.1", "globals": "^17.13.0", "gui-chat-protocol": "^2.3.0", + "prettier": "^3.9.10", "scoria": "^0.4.1", "tailwindcss": "^4.3.3", "typescript": "~6.0.3", diff --git a/yarn.lock b/yarn.lock index 31ea689..97c37b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2681,6 +2681,11 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier@^3.9.10: + version "3.9.10" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.9.10.tgz#ac378e432f1a7381518f2e080816bbaefa38d585" + integrity sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA== + pretty-ms@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-7.0.1.tgz#7d903eaab281f7d8e03c66f867e239dc32fb73e8" From 8329a34c04de9e721ca3d3d7202f45b2c7dd8b4a Mon Sep 17 00:00:00 2001 From: isamu Date: Sun, 18 Oct 2026 15:35:41 +0900 Subject: [PATCH 2/2] style: format with prettier Co-Authored-By: Claude Opus 5.5 --- demo/App.vue | 24 +++----------- src/core/definition.ts | 21 ++++-------- src/core/index.ts | 22 ++----------- src/core/logic.ts | 75 +++++++++++++++++++++++++----------------- src/core/plugin.ts | 27 ++++----------- src/core/types.ts | 5 +-- src/vue/Preview.vue | 18 ++-------- src/vue/View.vue | 57 +++++++------------------------- src/vue/index.ts | 9 +---- tsconfig.eslint.json | 15 ++------- vite.config.ts | 3 +- 11 files changed, 84 insertions(+), 192 deletions(-) diff --git a/demo/App.vue b/demo/App.vue index 5d74d6e..3243791 100644 --- a/demo/App.vue +++ b/demo/App.vue @@ -19,11 +19,7 @@

View Component

- +
@@ -44,17 +40,8 @@