diff --git a/apps/app/package.json b/apps/app/package.json index 922d0be0ee..8d89bcd1ad 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -33,7 +33,8 @@ "bump:patch": "node scripts/bump-version.mjs patch", "bump:minor": "node scripts/bump-version.mjs minor", "bump:major": "node scripts/bump-version.mjs major", - "bump:set": "node scripts/bump-version.mjs --set" + "bump:set": "node scripts/bump-version.mjs --set", + "lint:biome": "biome lint ." }, "dependencies": { "@ai-sdk/react": "^3.0.148", diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 5c0e5810b7..cb121e5650 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -22,7 +22,8 @@ "electron": "pnpm exec electron ./electron/main.mjs", "check:electron": "node ./scripts/check-electron-bridge.mjs", "typecheck:electron": "pnpm --dir ../server exec tsc -p ../desktop/tsconfig.electron.json --noEmit", - "prepare:sidecar": "node ./scripts/prepare-sidecar.mjs" + "prepare:sidecar": "node ./scripts/prepare-sidecar.mjs", + "lint:biome": "biome lint ." }, "dependencies": { "chrome-devtools-mcp": "0.17.0", diff --git a/apps/opencode-router/package.json b/apps/opencode-router/package.json index 2cd8f82b9d..d4b28fc96d 100644 --- a/apps/opencode-router/package.json +++ b/apps/opencode-router/package.json @@ -41,7 +41,8 @@ "test:unit": "pnpm build && bun test test/*.test.js", "test:smoke": "bun scripts/smoke.mjs", "test:cli": "pnpm build && bun scripts/test-cli.mjs", - "test:npx": "bun scripts/test-npx.mjs" + "test:npx": "bun scripts/test-npx.mjs", + "lint:biome": "biome lint ." }, "dependencies": { "@opencode-ai/sdk": "^1.14.38", diff --git a/apps/orchestrator/package.json b/apps/orchestrator/package.json index 7187e42c5a..445480a898 100644 --- a/apps/orchestrator/package.json +++ b/apps/orchestrator/package.json @@ -14,7 +14,8 @@ "typecheck": "tsc -p tsconfig.typecheck.json", "test:router": "pnpm build && node scripts/router.mjs", "test:files": "pnpm build && node scripts/files-session.mjs", - "prepublishOnly": "node -e \"console.error('openwork-orchestrator is published via apps/orchestrator/scripts/publish-npm.mjs (meta + platform packages)'); process.exit(1);\"" + "prepublishOnly": "node -e \"console.error('openwork-orchestrator is published via apps/orchestrator/scripts/publish-npm.mjs (meta + platform packages)'); process.exit(1);\"", + "lint:biome": "biome lint ." }, "files": [ "dist", diff --git a/apps/server-v2/package.json b/apps/server-v2/package.json index 224d52d281..07e89cf6e3 100644 --- a/apps/server-v2/package.json +++ b/apps/server-v2/package.json @@ -19,7 +19,8 @@ "build:bin:embedded:windows": "bun ./script/build.ts --outdir dist/bin --filename openwork-server-v2 --embed-runtime --target bun-windows-x64", "build:bin:all": "bun ./script/build.ts --outdir dist/bin --filename openwork-server-v2 --target bun-darwin-arm64 --target bun-darwin-x64-baseline --target bun-linux-x64-baseline --target bun-linux-arm64 --target bun-windows-x64", "build:bin:embedded:all": "bun ./script/build.ts --outdir dist/bin --filename openwork-server-v2 --embed-runtime --target bun-darwin-arm64 --target bun-darwin-x64-baseline --target bun-linux-x64-baseline --target bun-linux-arm64 --target bun-windows-x64", - "prepublishOnly": "pnpm openapi:generate && pnpm build:bin" + "prepublishOnly": "pnpm openapi:generate && pnpm build:bin", + "lint:biome": "biome lint ." }, "files": [ "bin", diff --git a/apps/server/package.json b/apps/server/package.json index faa5f9e569..00bd86b82a 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -14,7 +14,8 @@ "build:bin:all": "bun ./script/build.ts --outdir dist/bin --target bun-darwin-arm64 --target bun-darwin-x64 --target bun-linux-x64 --target bun-linux-arm64 --target bun-windows-x64", "start": "bun dist/cli.js", "typecheck": "tsc -p tsconfig.json --noEmit", - "prepublishOnly": "pnpm build:bin" + "prepublishOnly": "pnpm build:bin", + "lint:biome": "biome lint ." }, "files": [ "bin", diff --git a/apps/share/package.json b/apps/share/package.json index 1d7083eb05..f8f44e7bcf 100644 --- a/apps/share/package.json +++ b/apps/share/package.json @@ -8,7 +8,8 @@ "build": "next build", "start": "next start --hostname 0.0.0.0", "test": "node --test server/b/render-bundle-page.test.ts server/_lib/package-openwork-files.test.ts server/_lib/publish-security.test.ts server/_lib/render-og-image.test.ts server/_lib/share-utils.test.ts", - "test:e2e": "playwright test" + "test:e2e": "playwright test", + "lint:biome": "biome lint ." }, "dependencies": { "@vercel/blob": "^0.27.0", diff --git a/apps/story-book/package.json b/apps/story-book/package.json index 3b9661581c..4d267ba91f 100644 --- a/apps/story-book/package.json +++ b/apps/story-book/package.json @@ -7,7 +7,8 @@ "dev": "vite", "build": "vite build", "preview": "vite preview", - "typecheck": "tsc -p tsconfig.json --noEmit" + "typecheck": "tsc -p tsconfig.json --noEmit", + "lint:biome": "biome lint ." }, "devDependencies": { "@tailwindcss/vite": "^4.1.18", diff --git a/apps/ui-demo/package.json b/apps/ui-demo/package.json index 2cb9bde604..48f382a0f0 100644 --- a/apps/ui-demo/package.json +++ b/apps/ui-demo/package.json @@ -7,7 +7,8 @@ "dev": "pnpm --dir ../../packages/ui build && vite --host 0.0.0.0 --port 3333 --strictPort", "build": "pnpm --dir ../../packages/ui build && vite build", "preview": "vite preview --host 0.0.0.0 --port 3333 --strictPort", - "typecheck": "pnpm --dir ../../packages/ui build && tsc -p tsconfig.json --noEmit" + "typecheck": "pnpm --dir ../../packages/ui build && tsc -p tsconfig.json --noEmit", + "lint:biome": "biome lint ." }, "dependencies": { "@openwork/ui": "workspace:*", diff --git a/biome.json b/biome.json new file mode 100644 index 0000000000..a738625370 --- /dev/null +++ b/biome.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.4.14/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "includes": [ + "**", + "!**/node_modules", + "!**/dist", + "!**/build", + "!**/.next", + "!**/.turbo", + "!**/.tauri", + "!**/target", + "!**/coverage", + "!**/out", + "!vendor", + "!patches", + "!translated_readmes", + "!**/*.generated.ts", + "!**/*.gen.ts", + "!packages/openwork-server-sdk/src", + "!apps/server-v2/openapi.json", + "!pnpm-lock.yaml", + "!package-lock.json" + ] + }, + "formatter": { + "enabled": false + }, + "css": { + "linter": { + "enabled": false + }, + "parser": { + "cssModules": true + } + }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "suspicious": { + "noDebugger": "error" + } + } + }, + "assist": { + "enabled": false + } +} diff --git a/ee/apps/den-api/package.json b/ee/apps/den-api/package.json index 55beb8332b..25529512ad 100644 --- a/ee/apps/den-api/package.json +++ b/ee/apps/den-api/package.json @@ -8,7 +8,8 @@ "build": "node ./scripts/build.mjs", "build:den-db": "pnpm --filter @openwork-ee/den-db build", "seed:demo-org": "pnpm run build:den-db && sh -lc 'DEN_WEB_PORT=${DEN_WEB_PORT:-3005}; OPENWORK_DEV_MODE=${OPENWORK_DEV_MODE:-1} DATABASE_URL=${DATABASE_URL:-mysql://root:password@127.0.0.1:3306/openwork_den} DEN_DB_ENCRYPTION_KEY=${DEN_DB_ENCRYPTION_KEY:-local-dev-db-encryption-key-please-change-1234567890} BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-local-dev-secret-not-for-production-use!!} BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:$DEN_WEB_PORT} tsx scripts/seed-demo-org.ts'", - "start": "node dist/server.js" + "start": "node dist/server.js", + "lint:biome": "biome lint ." }, "dependencies": { "@better-auth/api-key": "^1.5.6", diff --git a/ee/apps/den-web/package.json b/ee/apps/den-web/package.json index 3a06afb66b..9db0b532c5 100644 --- a/ee/apps/den-web/package.json +++ b/ee/apps/den-web/package.json @@ -8,7 +8,8 @@ "prebuild": "pnpm --dir ../../../packages/ui build && pnpm --dir ../../packages/utils build", "build": "next build", "start": "next start --hostname 0.0.0.0 --port 3005", - "lint": "next lint" + "lint": "next lint", + "lint:biome": "biome lint ." }, "dependencies": { "@openwork/types": "workspace:*", diff --git a/ee/apps/den-worker-proxy/package.json b/ee/apps/den-worker-proxy/package.json index eba45db869..bd5e5ed00e 100644 --- a/ee/apps/den-worker-proxy/package.json +++ b/ee/apps/den-worker-proxy/package.json @@ -7,7 +7,8 @@ "dev:local": "sh -lc 'NODE_OPTIONS=--conditions=development OPENWORK_DEV_MODE=1 PORT=${DEN_WORKER_PROXY_PORT:-8789} tsx watch src/server.ts'", "build": "npm run build:den-db && tsc -p tsconfig.json", "build:den-db": "pnpm --filter @openwork-ee/den-db build", - "start": "node dist/server.js" + "start": "node dist/server.js", + "lint:biome": "biome lint ." }, "dependencies": { "@openwork-ee/den-db": "workspace:*", diff --git a/ee/apps/landing/package.json b/ee/apps/landing/package.json index 64adbe47f4..44e6e686e0 100644 --- a/ee/apps/landing/package.json +++ b/ee/apps/landing/package.json @@ -7,7 +7,8 @@ "prebuild": "pnpm --dir ../../../packages/ui build", "build": "next build", "start": "next start --hostname 0.0.0.0", - "lint": "next lint" + "lint": "next lint", + "lint:biome": "biome lint ." }, "dependencies": { "@openwork/ui": "workspace:*", diff --git a/ee/packages/den-db/package.json b/ee/packages/den-db/package.json index af6bbc662e..80c0e54a65 100644 --- a/ee/packages/den-db/package.json +++ b/ee/packages/den-db/package.json @@ -62,7 +62,8 @@ "build:utils": "pnpm --dir ../utils run build", "db:generate": "pnpm run build && node --import tsx ./node_modules/drizzle-kit/bin.cjs generate --config drizzle.config.ts", "db:migrate": "pnpm run build && node --import tsx ./node_modules/drizzle-kit/bin.cjs migrate --config drizzle.config.ts", - "db:push": "pnpm run build && node --import tsx ./node_modules/drizzle-kit/bin.cjs push --config drizzle.config.ts" + "db:push": "pnpm run build && node --import tsx ./node_modules/drizzle-kit/bin.cjs push --config drizzle.config.ts", + "lint:biome": "biome lint ." }, "dependencies": { "@openwork/types": "workspace:*", diff --git a/ee/packages/utils/package.json b/ee/packages/utils/package.json index 9ff94c1563..f762f46c6f 100644 --- a/ee/packages/utils/package.json +++ b/ee/packages/utils/package.json @@ -18,7 +18,8 @@ } }, "scripts": { - "build": "tsup" + "build": "tsup", + "lint:biome": "biome lint ." }, "dependencies": { "luxon": "^3.6.1", diff --git a/package.json b/package.json index 120c1af987..d1fc10dfe1 100644 --- a/package.json +++ b/package.json @@ -52,9 +52,12 @@ "release:prepare:dry": "node scripts/release/prepare.mjs --dry-run", "release:ship": "node scripts/release/ship.mjs", "release:ship:watch": "node scripts/release/ship.mjs --watch", - "tauri": "pnpm --filter @openwork/desktop exec tauri" + "tauri": "pnpm --filter @openwork/desktop exec tauri", + "lint": "turbo run lint:biome", + "lint:fix": "turbo run lint:biome -- --write" }, "devDependencies": { + "@biomejs/biome": "^2.4.14", "turbo": "^2.5.5" }, "pnpm": { diff --git a/packages/openwork-server-sdk/package.json b/packages/openwork-server-sdk/package.json index 984e17ce69..746e8557c0 100644 --- a/packages/openwork-server-sdk/package.json +++ b/packages/openwork-server-sdk/package.json @@ -18,7 +18,8 @@ "generate": "pnpm exec openapi-ts -f openapi-ts.config.ts", "watch": "node ./scripts/watch.mjs", "pretypecheck": "pnpm --dir ../.. run sdk:generate", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "lint:biome": "biome lint ." }, "dependencies": { "@hey-api/client-fetch": "0.13.1" diff --git a/packages/types/package.json b/packages/types/package.json index fc0d73ef88..05be4fe0dc 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -19,7 +19,8 @@ "dist" ], "scripts": { - "build": "tsup" + "build": "tsup", + "lint:biome": "biome lint ." }, "dependencies": { "zod": "^4.3.6" diff --git a/packages/ui/package.json b/packages/ui/package.json index 914ed66961..03707d0d53 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -20,7 +20,8 @@ "README.md" ], "scripts": { - "build": "tsup --config tsup.config.react.ts && tsup --config tsup.config.solid.ts" + "build": "tsup --config tsup.config.react.ts && tsup --config tsup.config.solid.ts", + "lint:biome": "biome lint ." }, "dependencies": { "@paper-design/shaders": "0.0.72", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1fea3aa95..3776465d36 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,9 @@ importers: .: devDependencies: + '@biomejs/biome': + specifier: ^2.4.14 + version: 2.4.14 turbo: specifier: ^2.5.5 version: 2.8.20 @@ -1302,6 +1305,59 @@ packages: '@better-fetch/fetch@1.1.21': resolution: {integrity: sha512-/ImESw0sskqlVR94jB+5+Pxjf+xBwDZF/N5+y2/q4EqD7IARUTSpPfIo8uf39SYpCxyOCtbyYpUrZ3F/k0zT4A==} + '@biomejs/biome@2.4.14': + resolution: {integrity: sha512-TmAvxOEgrpLypzVGJ8FulIZnlyA9TxrO1hyqYrCz9r+bwma9xXxuLA5IuYnj55XQneFx460KjRbx6SWGLkg3bQ==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@2.4.14': + resolution: {integrity: sha512-XvgoE9XOawUOQPdmvs4J7wPhi/DLwSCGks3AlPJDmh34O0awRTqCED1HRcRDdpf1Zrp4us4MGOOdIxNpbqNF5Q==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@2.4.14': + resolution: {integrity: sha512-jE7hKBCFhOx3uUh+ZkWBfOHxAcILPfhFplNkuID/eZeSTLHzfZzoZxW8fbqY9xXRnPi7jGNAf1iPVR+0yWsM/Q==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@2.4.14': + resolution: {integrity: sha512-/z+6gqAqqUQTHazwStxSXKHg9b8UvqBmDFRp+c4wYbq2KXhELQDon9EoC9RpmQ8JWkqQx/lIUy/cs+MhzDZp6A==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@2.4.14': + resolution: {integrity: sha512-2TELhZnW5RSLL063l9rc5xLpA0ZIw0Ccwy/0q384rvNAgFw3yI76bd59547yxowdQr5MNPET/xDLrLuvgSeeWQ==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@2.4.14': + resolution: {integrity: sha512-R6BWgJdQOwW9ulJatuTVrQkjnODjqHZkKNOqb1sz++3Noe5LYd0i3PchnOBUCYAPHoPWHhjJqbdZlHEu0hpjdA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@2.4.14': + resolution: {integrity: sha512-zHrlQZDBDUz4OLAraYpWKcnLS6HOewBFWYOzY91d1ZjdqZwibOyb6BEu6WuWLugyo0P3riCmsbV9UqV1cSXwQg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@2.4.14': + resolution: {integrity: sha512-M3EH5hqOI/F/FUA2u4xcLoUgmxd218mvuj/6JL7Hv2toQvr2/AdOvKSpGkoRuWFCtQPVa+ZqkEV3Q5xBA9+XSA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@2.4.14': + resolution: {integrity: sha512-WL0EG5qE+EAKomGXbf2g6VnSKJhTL3tXC0QRzWRwA5VpjxNYa6H4P7ZWfymbGE4IhZZQi1KXQ2R0YjwInmz2fA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@braintree/sanitize-url@7.1.2': resolution: {integrity: sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==} @@ -9209,6 +9265,41 @@ snapshots: '@better-fetch/fetch@1.1.21': {} + '@biomejs/biome@2.4.14': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 2.4.14 + '@biomejs/cli-darwin-x64': 2.4.14 + '@biomejs/cli-linux-arm64': 2.4.14 + '@biomejs/cli-linux-arm64-musl': 2.4.14 + '@biomejs/cli-linux-x64': 2.4.14 + '@biomejs/cli-linux-x64-musl': 2.4.14 + '@biomejs/cli-win32-arm64': 2.4.14 + '@biomejs/cli-win32-x64': 2.4.14 + + '@biomejs/cli-darwin-arm64@2.4.14': + optional: true + + '@biomejs/cli-darwin-x64@2.4.14': + optional: true + + '@biomejs/cli-linux-arm64-musl@2.4.14': + optional: true + + '@biomejs/cli-linux-arm64@2.4.14': + optional: true + + '@biomejs/cli-linux-x64-musl@2.4.14': + optional: true + + '@biomejs/cli-linux-x64@2.4.14': + optional: true + + '@biomejs/cli-win32-arm64@2.4.14': + optional: true + + '@biomejs/cli-win32-x64@2.4.14': + optional: true + '@braintree/sanitize-url@7.1.2': {} '@chevrotain/cst-dts-gen@11.1.2': diff --git a/turbo.json b/turbo.json index 8f8a47411d..17dc7e8cc9 100644 --- a/turbo.json +++ b/turbo.json @@ -29,6 +29,14 @@ "build": { "dependsOn": ["^build"], "outputs": ["dist/**", ".next/**"] + }, + "lint:biome": { + "inputs": [ + "$TURBO_DEFAULT$", + "../../biome.json", + "../../../biome.json" + ], + "outputs": [] } } }