Replace prettier with oxfmt for faster formatting (#2313)
## Summary
- Swap prettier for oxfmt in devDependencies for faster formatting
- Rename scripts: prettier -> fmt, prettier:check -> fmt:check
- Update lint-staged to use oxfmt
- Update CLAUDE.md and skill docs to reference npm run fmt
## Test plan
- [x] Run npm run fmt to verify formatting works
- [x] Run npm run fmt:check to verify check mode works
- [x] Verify lint-staged runs oxfmt on commit
#skip-bugbot
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Replaced Prettier with oxfmt for faster formatting. Updated to oxfmt
0.26.0, added a project config, renamed scripts to fmt and fmt:check,
and refreshed docs; oxfmt’s new rules applied compact formatting across
many files.
- **Migration**
- Use npm run fmt and npm run fmt:check in local workflows and CI.
- lint-staged now formats with oxfmt on commit.
- Requires Node 20.19+ or 22.12+.
<sup>Written for commit a9e3812b02849f8d6357913113fca68ca8b4fcbc.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
---------
Co-authored-by:
Claude Opus 4.5 <noreply@anthropic.com>
正在显示
.oxfmtrc.json
0 → 100644
差异被折叠。
| { | { | ||
| "name": "dyad", | "name": "dyad", | ||
| "productName": "dyad", | |||
| "version": "0.34.0-beta.1", | "version": "0.34.0-beta.1", | ||
| "description": "Free, local, open-source AI app builder", | "description": "Free, local, open-source AI app builder", | ||
| "main": ".vite/build/main.js", | "keywords": [], | ||
| "license": "MIT", | |||
| "author": { | |||
| "name": "Will Chen", | |||
| "email": "willchen90@gmail.com" | |||
| }, | |||
| "repository": { | "repository": { | ||
| "type": "git", | "type": "git", | ||
| "url": "https://github.com/dyad-sh/dyad.git" | "url": "https://github.com/dyad-sh/dyad.git" | ||
| }, | }, | ||
| "engines": { | "main": ".vite/build/main.js", | ||
| "node": ">=20" | |||
| }, | |||
| "scripts": { | "scripts": { | ||
| "clean": "rimraf out scaffold/node_modules", | "clean": "rimraf out scaffold/node_modules", | ||
| "start": "electron-forge start", | "start": "electron-forge start", | ||
| ... | @@ -28,9 +30,9 @@ | ... | @@ -28,9 +30,9 @@ |
| "db:generate": "drizzle-kit generate", | "db:generate": "drizzle-kit generate", | ||
| "db:push": "drizzle-kit push", | "db:push": "drizzle-kit push", | ||
| "db:studio": "drizzle-kit studio", | "db:studio": "drizzle-kit studio", | ||
| "prettier:check": "npx prettier --check .", | "fmt:check": "npx oxfmt --check", | ||
| "prettier": "npx prettier --write .", | "fmt": "npx oxfmt", | ||
| "presubmit": "npm run prettier:check && npm run lint", | "presubmit": "npm run fmt:check && npm run lint", | ||
| "test": "vitest run", | "test": "vitest run", | ||
| "test:watch": "vitest", | "test:watch": "vitest", | ||
| "test:ui": "vitest --ui", | "test:ui": "vitest --ui", | ||
| ... | @@ -40,52 +42,6 @@ | ... | @@ -40,52 +42,6 @@ |
| "e2e": "playwright test", | "e2e": "playwright test", | ||
| "e2e:shard": "playwright test --shard" | "e2e:shard": "playwright test --shard" | ||
| }, | }, | ||
| "keywords": [], | |||
| "author": { | |||
| "name": "Will Chen", | |||
| "email": "willchen90@gmail.com" | |||
| }, | |||
| "license": "MIT", | |||
| "devDependencies": { | |||
| "@electron-forge/cli": "^7.11.1", | |||
| "@electron-forge/maker-deb": "^7.11.1", | |||
| "@electron-forge/maker-rpm": "^7.11.1", | |||
| "@electron-forge/maker-squirrel": "^7.11.1", | |||
| "@electron-forge/maker-zip": "^7.11.1", | |||
| "@electron-forge/plugin-auto-unpack-natives": "^7.11.1", | |||
| "@electron-forge/plugin-fuses": "^7.11.1", | |||
| "@electron-forge/plugin-vite": "^7.11.1", | |||
| "@electron-forge/publisher-github": "^7.11.1", | |||
| "@electron/fuses": "^1.8.0", | |||
| "@playwright/test": "^1.52.0", | |||
| "@testing-library/react": "^16.3.0", | |||
| "@types/better-sqlite3": "^7.6.13", | |||
| "@types/fs-extra": "^11.0.4", | |||
| "@types/glob": "^8.1.0", | |||
| "@types/kill-port": "^2.0.3", | |||
| "@types/node": "^22.14.0", | |||
| "@types/react": "^19.0.10", | |||
| "@types/react-dom": "^19.0.4", | |||
| "@typescript-eslint/eslint-plugin": "^5.62.0", | |||
| "@typescript-eslint/parser": "^5.62.0", | |||
| "@typescript/native-preview": "^7.0.0-dev.20260107.1", | |||
| "@vitest/ui": "^3.1.1", | |||
| "babel-plugin-react-compiler": "^1.0.0", | |||
| "cross-env": "^7.0.3", | |||
| "drizzle-kit": "^0.30.6", | |||
| "electron": "40.0.0", | |||
| "eslint": "^8.57.1", | |||
| "eslint-plugin-import": "^2.31.0", | |||
| "happy-dom": "^17.4.4", | |||
| "husky": "^9.1.7", | |||
| "lint-staged": "^15.5.2", | |||
| "oxlint": "^1.41.0", | |||
| "prettier": "3.5.3", | |||
| "rimraf": "^6.0.1", | |||
| "typescript": "^5.8.3", | |||
| "vite": "^5.4.17", | |||
| "vitest": "^3.1.1" | |||
| }, | |||
| "dependencies": { | "dependencies": { | ||
| "@ai-sdk/amazon-bedrock": "^4.0.9", | "@ai-sdk/amazon-bedrock": "^4.0.9", | ||
| "@ai-sdk/anthropic": "^3.0.7", | "@ai-sdk/anthropic": "^3.0.7", | ||
| ... | @@ -182,9 +138,53 @@ | ... | @@ -182,9 +138,53 @@ |
| "uuid": "^11.1.0", | "uuid": "^11.1.0", | ||
| "zod": "^3.25.76" | "zod": "^3.25.76" | ||
| }, | }, | ||
| "devDependencies": { | |||
| "@electron-forge/cli": "^7.11.1", | |||
| "@electron-forge/maker-deb": "^7.11.1", | |||
| "@electron-forge/maker-rpm": "^7.11.1", | |||
| "@electron-forge/maker-squirrel": "^7.11.1", | |||
| "@electron-forge/maker-zip": "^7.11.1", | |||
| "@electron-forge/plugin-auto-unpack-natives": "^7.11.1", | |||
| "@electron-forge/plugin-fuses": "^7.11.1", | |||
| "@electron-forge/plugin-vite": "^7.11.1", | |||
| "@electron-forge/publisher-github": "^7.11.1", | |||
| "@electron/fuses": "^1.8.0", | |||
| "@playwright/test": "^1.52.0", | |||
| "@testing-library/react": "^16.3.0", | |||
| "@types/better-sqlite3": "^7.6.13", | |||
| "@types/fs-extra": "^11.0.4", | |||
| "@types/glob": "^8.1.0", | |||
| "@types/kill-port": "^2.0.3", | |||
| "@types/node": "^22.14.0", | |||
| "@types/react": "^19.0.10", | |||
| "@types/react-dom": "^19.0.4", | |||
| "@typescript-eslint/eslint-plugin": "^5.62.0", | |||
| "@typescript-eslint/parser": "^5.62.0", | |||
| "@typescript/native-preview": "^7.0.0-dev.20260107.1", | |||
| "@vitest/ui": "^3.1.1", | |||
| "babel-plugin-react-compiler": "^1.0.0", | |||
| "cross-env": "^7.0.3", | |||
| "drizzle-kit": "^0.30.6", | |||
| "electron": "40.0.0", | |||
| "eslint": "^8.57.1", | |||
| "eslint-plugin-import": "^2.31.0", | |||
| "happy-dom": "^17.4.4", | |||
| "husky": "^9.1.7", | |||
| "lint-staged": "^15.5.2", | |||
| "oxfmt": "^0.26.0", | |||
| "oxlint": "^1.41.0", | |||
| "rimraf": "^6.0.1", | |||
| "typescript": "^5.8.3", | |||
| "vite": "^5.4.17", | |||
| "vitest": "^3.1.1" | |||
| }, | |||
| "overrides": { | "overrides": { | ||
| "@vercel/sdk": { | "@vercel/sdk": { | ||
| "@modelcontextprotocol/sdk": "$@modelcontextprotocol/sdk" | "@modelcontextprotocol/sdk": "$@modelcontextprotocol/sdk" | ||
| } | } | ||
| } | }, | ||
| "engines": { | |||
| "node": ">=20" | |||
| }, | |||
| "productName": "dyad" | |||
| } | } |
请
注册
或者
登录
后发表评论