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.
This commit is contained in:
icarus 2025-09-15 06:05:27 +08:00
parent 025685881f
commit df707ffe39
2 changed files with 18 additions and 17 deletions

View File

@ -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,

View File

@ -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"