mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-06 05:09:09 +08:00
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:
parent
025685881f
commit
df707ffe39
31
biome.json
31
biome.json
@ -2,7 +2,8 @@
|
|||||||
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
|
||||||
"assist": {
|
"assist": {
|
||||||
"actions": { "source": { "organizeImports": "on", "useSortedKeys": "on" } },
|
"actions": { "source": { "organizeImports": "on", "useSortedKeys": "on" } },
|
||||||
"enabled": true
|
"enabled": true,
|
||||||
|
"includes": ["**/*.json", "!*.json", "!**/package.json"]
|
||||||
},
|
},
|
||||||
"files": { "ignoreUnknown": false },
|
"files": { "ignoreUnknown": false },
|
||||||
"formatter": {
|
"formatter": {
|
||||||
@ -14,20 +15,20 @@
|
|||||||
"formatWithErrors": false,
|
"formatWithErrors": false,
|
||||||
"includes": [
|
"includes": [
|
||||||
"**",
|
"**",
|
||||||
"!**/out/",
|
"!out/*",
|
||||||
"!**/dist/",
|
"!**/dist/*",
|
||||||
"!**/build/",
|
"!build/*",
|
||||||
"!**/.yarn/",
|
"!.yarn/*",
|
||||||
"!**/.github/",
|
"!.github/*",
|
||||||
"!**/.husky/",
|
"!.husky/*",
|
||||||
"!**/.vscode/",
|
"!.vscode/*",
|
||||||
"!**/*.yaml",
|
"!*.yaml",
|
||||||
"!**/*.yml",
|
"!*.yml",
|
||||||
"!**/*.mjs",
|
"!*.mjs",
|
||||||
"!**/*.cjs",
|
"!*.cjs",
|
||||||
"!**/*.md",
|
"!*.md",
|
||||||
"!**/*.json",
|
"!*.json",
|
||||||
"!src/main/integration/"
|
"!src/main/integration/*"
|
||||||
],
|
],
|
||||||
"indentStyle": "space",
|
"indentStyle": "space",
|
||||||
"indentWidth": 2,
|
"indentWidth": 2,
|
||||||
|
|||||||
@ -65,8 +65,8 @@
|
|||||||
"test:e2e": "yarn playwright test",
|
"test:e2e": "yarn playwright test",
|
||||||
"test:lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
|
"test:lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts",
|
||||||
"test:scripts": "vitest scripts",
|
"test:scripts": "vitest scripts",
|
||||||
"format": "prettier --write .",
|
"format": "biome format --write",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "biome format",
|
||||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix && yarn typecheck && yarn check:i18n",
|
"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",
|
"prepare": "git config blame.ignoreRevsFile .git-blame-ignore-revs && husky",
|
||||||
"claude": "dotenv -e .env -- claude"
|
"claude": "dotenv -e .env -- claude"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user