From 3a19f9a2e74153a024bb8f60f9f2cff7a07e7198 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Tue, 13 Jan 2026 11:21:00 -0500 Subject: [PATCH 1/3] chore: switching formatter from prettier to biome --- .changeset/good-turkeys-speak.md | 5 +++++ .prettierignore | 8 -------- .prettierrc.json | 3 --- .vscode/settings.json | 4 ++-- apps/cli/biome.json | 8 ++------ apps/cli/package.json | 3 --- apps/cli/src/exec/index.ts | 1 - biome.json | 10 +++++++++- bun.lock | 4 +--- package.json | 4 +--- packages/mock-verifying-paymaster/src/relay.ts | 13 +++++-------- turbo.json | 1 - 12 files changed, 25 insertions(+), 39 deletions(-) create mode 100644 .changeset/good-turkeys-speak.md delete mode 100644 .prettierignore delete mode 100644 .prettierrc.json diff --git a/.changeset/good-turkeys-speak.md b/.changeset/good-turkeys-speak.md new file mode 100644 index 00000000..f8a6798d --- /dev/null +++ b/.changeset/good-turkeys-speak.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": patch +--- + +migrate format from prettier to biome diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index ac7a77d7..00000000 --- a/.prettierignore +++ /dev/null @@ -1,8 +0,0 @@ -.changeset -.turbo -artifacts -cache -deployments -dist -export -generated diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 0a02bcef..00000000 --- a/.prettierrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tabWidth": 4 -} diff --git a/.vscode/settings.json b/.vscode/settings.json index b964237c..5a69aadb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,11 @@ { "editor.formatOnPaste": true, "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.defaultFormatter": "biomejs.biome", "editor.codeActionsOnSave": { "source.organizeImports": "explicit" }, "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "biomejs.biome" } } diff --git a/apps/cli/biome.json b/apps/cli/biome.json index 0d41e4c5..18debe84 100644 --- a/apps/cli/biome.json +++ b/apps/cli/biome.json @@ -1,16 +1,12 @@ { "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", - "extends": ["../../biome.json"], + "root": false, + "extends": "//", "linter": { "rules": { "complexity": { "noBannedTypes": "off" } } - }, - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true } } diff --git a/apps/cli/package.json b/apps/cli/package.json index 2ae2e9b7..7e7fc33b 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -41,7 +41,6 @@ "yaml": "^2.8.2" }, "devDependencies": { - "@biomejs/biome": "^2.2.4", "@cartesi/devnet": "2.0.0-alpha.9", "@cartesi/rollups": "2.1.1", "@types/bun": "^1.3.5", @@ -69,8 +68,6 @@ "codegen": "run-p codegen:wagmi", "codegen:wagmi": "wagmi generate", "compile": "bun build.ts", - "lint": "biome lint", - "posttest": "bun lint", "test": "vitest" }, "engines": { diff --git a/apps/cli/src/exec/index.ts b/apps/cli/src/exec/index.ts index 6b0db6a6..897af549 100644 --- a/apps/cli/src/exec/index.ts +++ b/apps/cli/src/exec/index.ts @@ -1,4 +1,3 @@ export * as cartesiMachine from "./cartesi-machine.js"; export * as genext2fs from "./genext2fs.js"; export * as mksquashfs from "./mksquashfs.js"; - diff --git a/biome.json b/biome.json index 0ad211b8..c4b4f6c2 100644 --- a/biome.json +++ b/biome.json @@ -8,12 +8,20 @@ } }, "formatter": { - "enabled": false + "enabled": true, + "includes": ["**", "!.changeset/pre.json"], + "indentStyle": "space", + "indentWidth": 4 }, "linter": { "enabled": true, "rules": { "recommended": true } + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true } } diff --git a/bun.lock b/bun.lock index 30f90e44..4457965a 100644 --- a/bun.lock +++ b/bun.lock @@ -8,13 +8,12 @@ "@biomejs/biome": "^2.3.11", "@changesets/cli": "^2.29.8", "@types/bun": "^1.3.5", - "prettier": "^3.7.4", "turbo": "^2.7.4", }, }, "apps/cli": { "name": "@cartesi/cli", - "version": "2.0.0-alpha.23", + "version": "2.0.0-alpha.24", "bin": { "cartesi": "./dist/index.js", }, @@ -45,7 +44,6 @@ "yaml": "^2.8.2", }, "devDependencies": { - "@biomejs/biome": "^2.2.4", "@cartesi/devnet": "2.0.0-alpha.9", "@cartesi/rollups": "2.1.1", "@types/bun": "^1.3.5", diff --git a/package.json b/package.json index 81d1d2e4..1c0664bc 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "build": "turbo run build", "clean": "turbo run clean", "dev": "turbo run dev --parallel", - "lint": "turbo run lint", - "format": "prettier --write \"**/*.{cjs,css,json,md,mjs,ts,tsx}\"", + "lint": "biome ci", "publish-packages": "bun changeset publish && git push --follow-tags", "test": "turbo test" }, @@ -16,7 +15,6 @@ "@biomejs/biome": "^2.3.11", "@changesets/cli": "^2.29.8", "@types/bun": "^1.3.5", - "prettier": "^3.7.4", "turbo": "^2.7.4" }, "packageManager": "bun@1.3.5", diff --git a/packages/mock-verifying-paymaster/src/relay.ts b/packages/mock-verifying-paymaster/src/relay.ts index 864ca495..04196ac3 100644 --- a/packages/mock-verifying-paymaster/src/relay.ts +++ b/packages/mock-verifying-paymaster/src/relay.ts @@ -68,7 +68,7 @@ const handleMethodV06 = async ( if (estimateGas) { let gasEstimates: | EstimateUserOperationGasReturnType - | undefined = undefined; + | undefined; try { gasEstimates = await altoBundlerV06.estimateUserOperationGas({ userOperation: op, @@ -171,7 +171,7 @@ const handleMethodV07 = async ( if (estimateGas) { let gasEstimates: | EstimateUserOperationGasReturnType - | undefined = undefined; + | undefined; try { gasEstimates = await altoBundlerV07.estimateUserOperationGas({ userOperation: op, @@ -445,12 +445,9 @@ export const createRpcHandler = ( console.log(`JSON.stringify(err): ${util.inspect(err)}`); const error = { - // biome-ignore lint/suspicious/noExplicitAny: - message: (err as any).message, - // biome-ignore lint/suspicious/noExplicitAny: - data: (err as any).data, - // biome-ignore lint/suspicious/noExplicitAny: - code: (err as any).code ?? -32603, + message: (err as unknown as { message: string }).message, + data: (err as unknown as { data: unknown }).data, + code: (err as unknown as { code: number }).code ?? -32603, }; return { diff --git a/turbo.json b/turbo.json index fc16336a..85d36de1 100644 --- a/turbo.json +++ b/turbo.json @@ -23,7 +23,6 @@ "cache": false, "persistent": true }, - "lint": {}, "start": { "dependsOn": ["^build"] }, From 4b818fc9a6f1c80bdf282d939df44aa34ce55389 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Tue, 13 Jan 2026 11:21:11 -0500 Subject: [PATCH 2/3] chore: bump bun --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1c0664bc..a5a0d52b 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@types/bun": "^1.3.5", "turbo": "^2.7.4" }, - "packageManager": "bun@1.3.5", + "packageManager": "bun@1.3.6", "workspaces": [ "apps/*", "packages/*" From 79a0901c6e1ad5c5eb5d1b49bb654cda06ec66ee Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Tue, 13 Jan 2026 11:22:08 -0500 Subject: [PATCH 3/3] =?UTF-8?q?ci:=20using=20=E2=80=94frozen-lockfifle=20f?= =?UTF-8?q?or=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cli.yaml | 2 +- .github/workflows/devnet.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/paymaster.yaml | 2 +- .github/workflows/release.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cli.yaml b/.github/workflows/cli.yaml index cae8532e..08b8e83c 100644 --- a/.github/workflows/cli.yaml +++ b/.github/workflows/cli.yaml @@ -30,7 +30,7 @@ jobs: version: v1.4.3 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Build run: bun run build --filter @cartesi/cli diff --git a/.github/workflows/devnet.yaml b/.github/workflows/devnet.yaml index 9819cbc8..dc333956 100644 --- a/.github/workflows/devnet.yaml +++ b/.github/workflows/devnet.yaml @@ -29,7 +29,7 @@ jobs: version: v1.4.3 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Build run: bun run build --filter @cartesi/devnet diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3d368555..80515490 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,7 +16,7 @@ jobs: - uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Lint run: bun run lint diff --git a/.github/workflows/paymaster.yaml b/.github/workflows/paymaster.yaml index 9f8f1bc9..305751bc 100644 --- a/.github/workflows/paymaster.yaml +++ b/.github/workflows/paymaster.yaml @@ -29,7 +29,7 @@ jobs: version: v1.4.3 - name: Install dependencies - run: bun install + run: bun install --frozen-lockfile - name: Build run: bun run build --filter @cartesi/mock-verifying-paymaster diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 790efb60..875b380c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,7 +40,7 @@ jobs: version: v1.4.3 - name: Install Dependencies - run: bun install + run: bun install --frozen-lockfile - name: Build run: bun run build