Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/good-turkeys-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/cli": patch
---

migrate format from prettier to biome
2 changes: 1 addition & 1 deletion .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/paymaster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions .prettierignore

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
8 changes: 2 additions & 6 deletions apps/cli/biome.json
Original file line number Diff line number Diff line change
@@ -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
}
}
3 changes: 0 additions & 3 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion apps/cli/src/exec/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * as cartesiMachine from "./cartesi-machine.js";
export * as genext2fs from "./genext2fs.js";
export * as mksquashfs from "./mksquashfs.js";

10 changes: 9 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
4 changes: 1 addition & 3 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@
"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"
},
"devDependencies": {
"@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",
"packageManager": "bun@1.3.6",
"workspaces": [
"apps/*",
"packages/*"
Expand Down
13 changes: 5 additions & 8 deletions packages/mock-verifying-paymaster/src/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const handleMethodV06 = async (
if (estimateGas) {
let gasEstimates:
| EstimateUserOperationGasReturnType<ENTRYPOINT_ADDRESS_V06_TYPE>
| undefined = undefined;
| undefined;
try {
gasEstimates = await altoBundlerV06.estimateUserOperationGas({
userOperation: op,
Expand Down Expand Up @@ -171,7 +171,7 @@ const handleMethodV07 = async (
if (estimateGas) {
let gasEstimates:
| EstimateUserOperationGasReturnType<ENTRYPOINT_ADDRESS_V07_TYPE>
| undefined = undefined;
| undefined;
try {
gasEstimates = await altoBundlerV07.estimateUserOperationGas({
userOperation: op,
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"cache": false,
"persistent": true
},
"lint": {},
"start": {
"dependsOn": ["^build"]
},
Expand Down