Sitelet https://github.com/init4samwise/openclaw/commit/c379191f80f9dd19f0f5a70886a8cb26ee21b66f
Skip to content

Commit c379191

Browse files
steipetecpojer
andcommitted
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
1 parent 912ebff commit c379191

1,480 files changed

Lines changed: 28719 additions & 43658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
- runtime: node
7575
task: protocol
7676
command: pnpm protocol:check
77-
- runtime: bun
78-
task: lint
79-
command: bunx biome check src
77+
- runtime: node
78+
task: format
79+
command: pnpm format
8080
- runtime: bun
8181
task: test
8282
command: bunx vitest run

‎.oxfmtrc.jsonc‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"indentWidth": 2,
4+
"printWidth": 100
5+
}

‎.oxlintrc.jsonc‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json.schemastore.org/oxlintrc",
3+
"extends": ["recommended"]
4+
}

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
- Run CLI in dev: `pnpm clawdbot ...` (bun) or `pnpm dev`.
2626
- Node remains supported for running built output (`dist/*`) and production installs.
2727
- Type-check/build: `pnpm build` (tsc)
28-
- Lint/format: `pnpm lint` (biome check), `pnpm format` (biome format)
28+
- Lint/format: `pnpm lint` (oxlint), `pnpm format` (oxfmt)
2929
- Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage`
3030

3131
## Coding Style & Naming Conventions
3232
- Language: TypeScript (ESM). Prefer strict typing; avoid `any`.
33-
- Formatting/linting via Biome; run `pnpm lint` before commits.
33+
- Formatting/linting via Oxlint and Oxfmt; run `pnpm lint` before commits.
3434
- Add brief code comments for tricky or non-obvious logic.
3535
- Keep files concise; extract helpers instead of “V2” copies. Use existing patterns for CLI options and dependency injection via `createDefaultDeps`.
3636
- Aim to keep files under ~700 LOC; guideline only (not a hard guardrail). Split/refactor when it improves clarity or testability.

‎biome.json‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎package.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@
8787
"mac:restart": "bash scripts/restart-mac.sh",
8888
"mac:package": "bash scripts/package-mac-app.sh",
8989
"mac:open": "open dist/Clawdbot.app",
90-
"lint": "biome check src test && oxlint --type-aware src test --ignore-pattern src/canvas-host/a2ui/a2ui.bundle.js",
90+
"lint": "oxlint --type-aware src test --ignore-pattern src/canvas-host/a2ui/a2ui.bundle.js",
9191
"lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
9292
"lint:all": "pnpm lint && pnpm lint:swift",
93-
"lint:fix": "biome check --write --unsafe src && biome format --write src",
94-
"format": "biome format src",
93+
"lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test --ignore-pattern src/canvas-host/a2ui/a2ui.bundle.js",
94+
"format": "oxfmt --check src test",
9595
"format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/ClawdbotKit/Sources",
9696
"format:all": "pnpm format && pnpm format:swift",
97-
"format:fix": "biome format src --write",
97+
"format:fix": "oxfmt --write src test",
9898
"test": "vitest run",
9999
"test:watch": "vitest",
100100
"test:ui": "pnpm --dir ui test",
@@ -176,7 +176,6 @@
176176
"zod": "^4.3.5"
177177
},
178178
"devDependencies": {
179-
"@biomejs/biome": "^2.3.11",
180179
"@grammyjs/types": "^3.23.0",
181180
"@lit-labs/signals": "^0.2.0",
182181
"@lit/context": "^1.1.6",
@@ -194,7 +193,8 @@
194193
"lit": "^3.3.2",
195194
"lucide": "^0.562.0",
196195
"ollama": "^0.6.3",
197-
"oxlint": "^1.38.0",
196+
"oxfmt": "0.24.0",
197+
"oxlint": "^1.39.0",
198198
"oxlint-tsgolint": "^0.11.0",
199199
"quicktype-core": "^23.2.6",
200200
"rolldown": "1.0.0-beta.59",

‎pnpm-lock.yaml‎

Lines changed: 92 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/agents/agent-paths.ts‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ import { resolveUserPath } from "../utils.js";
66

77
export function resolveClawdbotAgentDir(): string {
88
const override =
9-
process.env.CLAWDBOT_AGENT_DIR?.trim() ||
10-
process.env.PI_CODING_AGENT_DIR?.trim();
9+
process.env.CLAWDBOT_AGENT_DIR?.trim() || process.env.PI_CODING_AGENT_DIR?.trim();
1110
if (override) return resolveUserPath(override);
12-
const defaultAgentDir = path.join(
13-
resolveStateDir(),
14-
"agents",
15-
DEFAULT_AGENT_ID,
16-
"agent",
17-
);
11+
const defaultAgentDir = path.join(resolveStateDir(), "agents", DEFAULT_AGENT_ID, "agent");
1812
return resolveUserPath(defaultAgentDir);
1913
}
2014

‎src/agents/agent-scope.test.ts‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,8 @@ describe("resolveAgentConfig", () => {
7272
},
7373
};
7474

75-
expect(resolveAgentModelPrimary(cfg, "linus")).toBe(
76-
"anthropic/claude-opus-4",
77-
);
78-
expect(resolveAgentModelFallbacksOverride(cfg, "linus")).toEqual([
79-
"openai/gpt-5.2",
80-
]);
75+
expect(resolveAgentModelPrimary(cfg, "linus")).toBe("anthropic/claude-opus-4");
76+
expect(resolveAgentModelFallbacksOverride(cfg, "linus")).toEqual(["openai/gpt-5.2"]);
8177

8278
// If fallbacks isn't present, we don't override the global fallbacks.
8379
const cfgNoOverride: ClawdbotConfig = {
@@ -92,9 +88,7 @@ describe("resolveAgentConfig", () => {
9288
],
9389
},
9490
};
95-
expect(resolveAgentModelFallbacksOverride(cfgNoOverride, "linus")).toBe(
96-
undefined,
97-
);
91+
expect(resolveAgentModelFallbacksOverride(cfgNoOverride, "linus")).toBe(undefined);
9892

9993
// Explicit empty list disables global fallbacks for that agent.
10094
const cfgDisable: ClawdbotConfig = {

0 commit comments

Comments
 (0)