From df707ffe390ff1732bc7f5b6d1018a42c0a36374 Mon Sep 17 00:00:00 2001 From: icarus Date: Mon, 15 Sep 2025 06:05:27 +0800 Subject: [PATCH] build: migrate from prettier to biome for formatting Update package.json scripts and biome.json configuration to use biome instead of prettier for code formatting. Adjust biome formatter includes/excludes patterns for better file matching. --- biome.json | 31 ++++++++++++++++--------------- package.json | 4 ++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/biome.json b/biome.json index 39520cce18..652799a375 100644 --- a/biome.json +++ b/biome.json @@ -2,7 +2,8 @@ "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json", "assist": { "actions": { "source": { "organizeImports": "on", "useSortedKeys": "on" } }, - "enabled": true + "enabled": true, + "includes": ["**/*.json", "!*.json", "!**/package.json"] }, "files": { "ignoreUnknown": false }, "formatter": { @@ -14,20 +15,20 @@ "formatWithErrors": false, "includes": [ "**", - "!**/out/", - "!**/dist/", - "!**/build/", - "!**/.yarn/", - "!**/.github/", - "!**/.husky/", - "!**/.vscode/", - "!**/*.yaml", - "!**/*.yml", - "!**/*.mjs", - "!**/*.cjs", - "!**/*.md", - "!**/*.json", - "!src/main/integration/" + "!out/*", + "!**/dist/*", + "!build/*", + "!.yarn/*", + "!.github/*", + "!.husky/*", + "!.vscode/*", + "!*.yaml", + "!*.yml", + "!*.mjs", + "!*.cjs", + "!*.md", + "!*.json", + "!src/main/integration/*" ], "indentStyle": "space", "indentWidth": 2, diff --git a/package.json b/package.json index e7c06713a0..7fa5c82bca 100644 --- a/package.json +++ b/package.json @@ -65,8 +65,8 @@ "test:e2e": "yarn playwright test", "test:lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts", "test:scripts": "vitest scripts", - "format": "prettier --write .", - "format:check": "prettier --check .", + "format": "biome format --write", + "format:check": "biome format", "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix && yarn typecheck && yarn check:i18n", "prepare": "git config blame.ignoreRevsFile .git-blame-ignore-revs && husky", "claude": "dotenv -e .env -- claude"