From ee38445e4f292b574c9c082b28ebac890dc67c13 Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Wed, 5 Aug 2026 01:13:26 +0900 Subject: [PATCH 1/2] chore: migrate editor tooling to Oxc --- .prettierignore | 9 -- .prettierrc | 17 --- .vscode/extensions.json | 1 - .vscode/settings.json | 7 +- oxfmt.config.ts | 27 +++++ package.json | 6 +- pnpm-lock.yaml | 227 ++++++++++++++++++++++++++++++++++++++-- 7 files changed, 250 insertions(+), 44 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc create mode 100644 oxfmt.config.ts diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 586c02d..0000000 --- a/.prettierignore +++ /dev/null @@ -1,9 +0,0 @@ -dist -.claude -public -node_modules - -pnpm-lock.yaml -**/__screenshots__ - -LICENSE \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 9f0f446..0000000 --- a/.prettierrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "tabWidth": 4, - "useTabs": false, - "singleQuote": false, - "semi": true, - "trailingComma": "es5", - "arrowParens": "always", - "endOfLine": "lf", - "overrides": [ - { - "files": ["*.yaml", "*.yml"], - "options": { - "tabWidth": 2 - } - } - ] -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4293a28..3ea3e90 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,7 +2,6 @@ "recommendations": [ "oxc.oxc-vscode", "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", "vitest.explorer" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index b73cd63..89be0e7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,19 +1,18 @@ { "[javascript][typescript][javascriptreact][typescriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.tabSize": 4 }, "[github-actions-workflow][yaml]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.tabSize": 2 }, "[json][css]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "oxc.oxc-vscode", "editor.tabSize": 4 }, "js/ts.preferences.preferTypeOnlyAutoImports": true, "oxc.typeAware": true, - "prettier.requireConfig": true, "files.exclude": { // Generated d.ts, which is not useful since all tsconfig emits there. "dist-ts": true, diff --git a/oxfmt.config.ts b/oxfmt.config.ts new file mode 100644 index 0000000..2c54a22 --- /dev/null +++ b/oxfmt.config.ts @@ -0,0 +1,27 @@ +import { defineConfig } from "oxfmt"; + +export default defineConfig({ + arrowParens: "always", + endOfLine: "lf", + printWidth: 80, + semi: true, + singleQuote: false, + sortPackageJson: false, + tabWidth: 4, + trailingComma: "es5", + useTabs: false, + overrides: [ + { + files: ["*.yaml", "*.yml"], + options: { + tabWidth: 2, + }, + }, + { + files: ["*.jsonc"], + options: { + trailingComma: "none", + }, + }, + ], +}); diff --git a/package.json b/package.json index 4cf10b7..6973b15 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "format": "prettier --write . --cache --list-different", - "format:check": "prettier --check . --cache", + "format": "oxfmt --write .", + "format:check": "oxfmt --check .", "lint": "pnpm run lint:check --fix", "lint:check": "oxlint .", "postinstall": "pnpm exec simple-git-hooks", @@ -41,10 +41,10 @@ "@vitest/coverage-v8": "^4.1.10", "globals": "^17.7.0", "jsdom": "^30.0.1", + "oxfmt": "^0.62.0", "oxlint": "^1.73.0", "oxlint-tsgolint": "^0.24.0", "postcss": "^8.5.16", - "prettier": "^3.9.5", "simple-git-hooks": "^2.13.1", "tailwindcss": "^4.3.2", "typescript": "~7.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9876d8..a1354bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,6 +54,9 @@ importers: jsdom: specifier: ^30.0.1 version: 30.0.1 + oxfmt: + specifier: ^0.62.0 + version: 0.62.0 oxlint: specifier: ^1.73.0 version: 1.76.0(oxlint-tsgolint@0.24.0) @@ -63,9 +66,6 @@ importers: postcss: specifier: ^8.5.16 version: 8.5.25 - prettier: - specifier: ^3.9.5 - version: 3.9.6 simple-git-hooks: specifier: ^2.13.1 version: 2.13.1 @@ -218,6 +218,120 @@ packages: '@oxc-project/types@0.142.0': resolution: {integrity: sha512-7W+2q5AKQVU36fkaryontrHn3YDt1RyUYXatw9i5H8ocYe2sPKSFB6eS8WNPeRKiN1qAWWZUPm7gwFzJGrccqQ==} + '@oxfmt/binding-android-arm-eabi@0.62.0': + resolution: {integrity: sha512-pdsv0C4gPjJ8H1+sd8u0BDx+yLACTL+rgeMIOL1ln4ihSnhw8CWXtYWgvcSkyTfgGBIzFKab+d8rx9Xl4en/Kw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.62.0': + resolution: {integrity: sha512-WC3YQ7uS/KtDrjmqwBviwFKe9qeoi+eXx8aX1z/ffG23Md75myjrJaQqTuJvdOLPoa4EYTjDWH0dHXfwulCVog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.62.0': + resolution: {integrity: sha512-GM8Yf3LjjaR1I8PD0SfeoIlwhsh9GvSF+cQ8sf624Yxnjsyumn95aFzYfKJVefblfDIiOAnZ7QVm2sa21Er/0Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.62.0': + resolution: {integrity: sha512-d5THp7F8bCxLqNogEXDORRsQD6dosf3EyFtnXfBer6v+8tGdcWIjoDX9WaXrrF/26zOmL8qHpPTKCEvpBDmZkQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.62.0': + resolution: {integrity: sha512-1DnrtXGZooOZ0fHgAXZUaDQzBVh1CM2MNW4oBXyQ2aWKvCHjyljvT9fgBkOM0fEOb96X5eqtcfJ0YUVt9jj66g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.62.0': + resolution: {integrity: sha512-4pQDHOYRH+Huqe0StIaWyvk2CVl/aTaqSrbZpA3/pLS2xH24ME7lBgYprhQF2fRkHBzhGGGKliwxFsDdHwx59g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.62.0': + resolution: {integrity: sha512-X0jAaZJFMCVKhB6YyWVTQ/wN2DLsBcZKSMqTS76bF6riT+XZdtg2FPEdjDvdVbunO9cG+tWiVaEs4Zs38lxYog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.62.0': + resolution: {integrity: sha512-682Z8T5s8T5ATArYtsejKvbIfd8LEAXyyDkKkoZVq8HND7Vx8TYLlrDjDSeYfodMeVwHOgkj13lJYR8cj6vUSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxfmt/binding-linux-arm64-musl@0.62.0': + resolution: {integrity: sha512-lk25fAl7KWaLWVJcW0CHEXB7QlQZtx5eDkjpaGMK0hzXTjUe0Wmlu8IKuFHoviSOcEJedRTs4VE/506VqGxGew==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@oxfmt/binding-linux-ppc64-gnu@0.62.0': + resolution: {integrity: sha512-SFyNqHQLwySceWNLhiSldx7wPXRAzP0L0WcW9GegP3uWrpZGJiZlQO85NbHAFPEfxR9PhZ9qSnZryEh7+v+4Gw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@oxfmt/binding-linux-riscv64-gnu@0.62.0': + resolution: {integrity: sha512-KYj55C1ywJfHo6+aKDuEmUtVEdJALsC5GwayDGsI6FGz2GxFqNr/mA8nxVsNbJzm7sE5MRqTQ9ziImSzhYXysA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxfmt/binding-linux-riscv64-musl@0.62.0': + resolution: {integrity: sha512-BhZDNo5GOU5nC378RhD0/XpvaEBHsH3HLgJp8YZX3A0InC7oivzA63HsRmiXFLtLSHAstEVrDf6fbC7Rs8Jh/A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + + '@oxfmt/binding-linux-s390x-gnu@0.62.0': + resolution: {integrity: sha512-UyAFmyHkgSgUJ/wOM4p3U8AC2yAFvRH5PNBs7TnK0fObTT/XSWcdr/lAzPSWaekHaZFaMeFZyk9n93Joq3J93A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@oxfmt/binding-linux-x64-gnu@0.62.0': + resolution: {integrity: sha512-1iYMP0leytWazFubD/WnINJuIrzRPuoL1aWEJdlGezEzDbTxcd29R4r8IUzP2oWeKst5V02uMJgR2NILlPlG6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxfmt/binding-linux-x64-musl@0.62.0': + resolution: {integrity: sha512-4rA/URtJSTVNVAQz6Q8wf7SaRvOXVy+TizriT9hs/Y1XhLR/R+92uWKRQG8yFWRAIEBbFHJ6WevQcl/G9SXEfw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@oxfmt/binding-openharmony-arm64@0.62.0': + resolution: {integrity: sha512-mSZuFHU2ar1KLUjXpI2QBQcJ1VsOB3mOCgQXuXCpKs19dgh4u+OaovNfrWDfiJb+ihJ2+f7YFcaO9bS2dlTCXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.62.0': + resolution: {integrity: sha512-OfwuhkcjDlqC4EgDojtiV9mzpLqeB9KqTOWPOjLEYBVdDCVSxqW3qzp/xcIxsbtI0UgGCnKvAqYKyY25kf5JZw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.62.0': + resolution: {integrity: sha512-P9uDDNFRzghO3X8QAzhkjKhK7JvtABsVn8UYtFX7uor12IAnwNt8nNIctvfWj1JkQU/kE+fmLRPiw7XlrIHsZw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.62.0': + resolution: {integrity: sha512-dlI5SY7XYQCiCBafntWagCR6HcAJB/NpsLtdlPx8x08+Osz8Ok1HHz1GZuusegCe/VoJ6pAnF5a4pd5OZAq7qQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + '@oxlint-tsgolint/darwin-arm64@0.24.0': resolution: {integrity: sha512-C2uMmwK5Bc4ri4ysZ6sA8Rcu+A5zBQTp6ml2u0CLLbRZp4kMFPV3yWk8B5DK9Aw7y9bbjogIm75tUwGLFzlsYQ==} cpu: [arm64] @@ -1093,6 +1207,19 @@ packages: resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==} engines: {node: '>=12.20.0'} + oxfmt@0.62.0: + resolution: {integrity: sha512-vxgGHTmnDU9j4CX7dDBLzxgmHxfda/yPcgJkGCMUSCwRmz+euo/V08xXLNgXTeqAB9Fhf3Pe2nO1RNKLCVgphQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + svelte: ^5.0.0 + vite-plus: '*' + peerDependenciesMeta: + svelte: + optional: true + vite-plus: + optional: true + oxlint-tsgolint@0.24.0: resolution: {integrity: sha512-giCk5sEvG02d5tzPmFMX3hem8ndzEEu1xvGYS5OwNfO2WGl6ZVxt5LjE0yiMDoz94INI7XkXwgFAQiydPvVHDw==} hasBin: true @@ -1127,11 +1254,6 @@ packages: resolution: {integrity: sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==} engines: {node: ^10 || ^12 || >=14} - prettier@3.9.6: - resolution: {integrity: sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==} - engines: {node: '>=14'} - hasBin: true - pretty-format@27.5.1: resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -1243,6 +1365,10 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tinypool@2.1.0: + resolution: {integrity: sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw==} + engines: {node: ^20.0.0 || >=22.0.0} + tinyrainbow@3.1.1: resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==} engines: {node: '>=14.0.0'} @@ -1515,6 +1641,63 @@ snapshots: '@oxc-project/types@0.142.0': {} + '@oxfmt/binding-android-arm-eabi@0.62.0': + optional: true + + '@oxfmt/binding-android-arm64@0.62.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.62.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.62.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.62.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.62.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.62.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.62.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.62.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.62.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.62.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.62.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.62.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.62.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.62.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.62.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.62.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.62.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.62.0': + optional: true + '@oxlint-tsgolint/darwin-arm64@0.24.0': optional: true @@ -2153,6 +2336,30 @@ snapshots: obug@2.1.4: {} + oxfmt@0.62.0: + dependencies: + tinypool: 2.1.0 + optionalDependencies: + '@oxfmt/binding-android-arm-eabi': 0.62.0 + '@oxfmt/binding-android-arm64': 0.62.0 + '@oxfmt/binding-darwin-arm64': 0.62.0 + '@oxfmt/binding-darwin-x64': 0.62.0 + '@oxfmt/binding-freebsd-x64': 0.62.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.62.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.62.0 + '@oxfmt/binding-linux-arm64-gnu': 0.62.0 + '@oxfmt/binding-linux-arm64-musl': 0.62.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.62.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.62.0 + '@oxfmt/binding-linux-riscv64-musl': 0.62.0 + '@oxfmt/binding-linux-s390x-gnu': 0.62.0 + '@oxfmt/binding-linux-x64-gnu': 0.62.0 + '@oxfmt/binding-linux-x64-musl': 0.62.0 + '@oxfmt/binding-openharmony-arm64': 0.62.0 + '@oxfmt/binding-win32-arm64-msvc': 0.62.0 + '@oxfmt/binding-win32-ia32-msvc': 0.62.0 + '@oxfmt/binding-win32-x64-msvc': 0.62.0 + oxlint-tsgolint@0.24.0: optionalDependencies: '@oxlint-tsgolint/darwin-arm64': 0.24.0 @@ -2201,8 +2408,6 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - prettier@3.9.6: {} - pretty-format@27.5.1: dependencies: ansi-regex: 5.0.1 @@ -2305,6 +2510,8 @@ snapshots: fdir: 6.5.0(picomatch@4.0.5) picomatch: 4.0.5 + tinypool@2.1.0: {} + tinyrainbow@3.1.1: {} tldts-core@7.4.9: {} From 16f9ede4b9a9181a20f984e1b5b7d6488ed499da Mon Sep 17 00:00:00 2001 From: concertypin <55056558+concertypin@users.noreply.github.com> Date: Wed, 5 Aug 2026 01:46:33 +0900 Subject: [PATCH 2/2] refactor: use shared Oxfmt preset --- oxfmt.config.ts | 28 +++------------------------- package.json | 2 +- pnpm-lock.yaml | 14 ++++++++------ 3 files changed, 12 insertions(+), 32 deletions(-) diff --git a/oxfmt.config.ts b/oxfmt.config.ts index 2c54a22..680ebd1 100644 --- a/oxfmt.config.ts +++ b/oxfmt.config.ts @@ -1,27 +1,5 @@ import { defineConfig } from "oxfmt"; -export default defineConfig({ - arrowParens: "always", - endOfLine: "lf", - printWidth: 80, - semi: true, - singleQuote: false, - sortPackageJson: false, - tabWidth: 4, - trailingComma: "es5", - useTabs: false, - overrides: [ - { - files: ["*.yaml", "*.yml"], - options: { - tabWidth: 2, - }, - }, - { - files: ["*.jsonc"], - options: { - trailingComma: "none", - }, - }, - ], -}); +import base from "@concertypin/config/oxfmt"; + +export default defineConfig(base); diff --git a/package.json b/package.json index 6973b15..195a031 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "react-router-dom": "^7.18.1" }, "devDependencies": { - "@concertypin/config": "^0.2.0", + "@concertypin/config": ">=0.3.0 <1.0.0", "@tailwindcss/postcss": "^4.3.2", "@testing-library/dom": "^10.4.1", "@testing-library/jest-dom": "^6.9.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1354bb..90fe7bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: version: 7.18.2(react-dom@19.2.8(react@19.2.8))(react@19.2.8) devDependencies: '@concertypin/config': - specifier: ^0.2.0 - version: 0.2.0(oxlint@1.76.0(oxlint-tsgolint@0.24.0)) + specifier: '>=0.3.0 <1.0.0' + version: 0.3.0(oxfmt@0.62.0)(oxlint@1.76.0(oxlint-tsgolint@0.24.0)) '@tailwindcss/postcss': specifier: ^4.3.2 version: 4.3.3 @@ -132,10 +132,11 @@ packages: resolution: {integrity: sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw==} hasBin: true - '@concertypin/config@0.2.0': - resolution: {integrity: sha512-ezicM+Ia7NJ/d7FdSEvpWsvm6VPhrjGcP4JNQfFmdTBhqMgyry7aDaczKVlk70fpTq1E3FJ5tsL1pdVA9layxg==} - engines: {node: '>=24'} + '@concertypin/config@0.3.0': + resolution: {integrity: sha512-JZBknzlmt8lV/nkzhUJMOdHzGWVtY/9jqbtTzu3jWvTIo0GpYSKH0lITVtc66WeyIiGmi8l4FfksJzonLdWbPQ==} + engines: {node: '>=24.11.0'} peerDependencies: + oxfmt: '>=0.62.0 <1' oxlint: '>=1.47.0 <2' '@csstools/color-helpers@6.1.0': @@ -1567,8 +1568,9 @@ snapshots: dependencies: css-tree: 3.2.1 - '@concertypin/config@0.2.0(oxlint@1.76.0(oxlint-tsgolint@0.24.0))': + '@concertypin/config@0.3.0(oxfmt@0.62.0)(oxlint@1.76.0(oxlint-tsgolint@0.24.0))': dependencies: + oxfmt: 0.62.0 oxlint: 1.76.0(oxlint-tsgolint@0.24.0) '@csstools/color-helpers@6.1.0': {}