Skip to content

Conversation

@tuler
Copy link
Member

@tuler tuler commented Jan 13, 2026

Switching from prettier to biome for code formatting.
Just 1 ts file needed change.

Also changed CI to run both lint and formatter, by using biome ci.

Also changed bun install to force lock file in CI.
Also bump bun from 1.3.5 to 1.3.6

@tuler tuler requested a review from endersonmaia January 13, 2026 16:24
@changeset-bot
Copy link

changeset-bot bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: 79a0901

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cartesi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

Coverage Report for ./apps/cli

Status Category Percentage Covered / Total
🔵 Lines 90.56% 288 / 318
🔵 Statements 90.15% 293 / 325
🔵 Functions 91.22% 52 / 57
🔵 Branches 74.17% 112 / 151
File CoverageNo changed files found.
Generated in workflow #754 for commit 79a0901 by the Vitest Coverage Report Action

@endersonmaia
Copy link
Contributor

It works with bun run lint from root directory.

✗ bun run lint
$ turbo run lint
• turbo 2.7.4
• Packages in scope: @cartesi/cli, @cartesi/devnet, @cartesi/mock-verifying-paymaster, @cartesi/sdk, tsconfig
• Running lint in 5 packages
• Remote caching disabled
@cartesi/cli:lint: cache hit, replaying logs a285ef00a5c39edb
@cartesi/cli:lint:
@cartesi/cli:lint: $ biome ci
@cartesi/cli:lint: Checked 66 files in 30ms. No fixes applied.

But fails if I try to run bunx biome ci from the root directory.

✗ bunx biome ci
/home/endersonmaia/Work/cartesi/cli/apps/cli/biome.json configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Found a nested root configuration, but there's already a root configuration.

  ℹ The other configuration was found in /home/endersonmaia/Work/cartesi/cli.

  ℹ Use the migration command from the root of the project to update the configuration.

  $ biome migrate --write


configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ Biome exited because the configuration resulted in errors. Please fix them.

@tuler
Copy link
Member Author

tuler commented Jan 13, 2026

But fails if I try to run bunx biome ci from the root directory.

Correct. We are using biome in a monorepo setup.

Which means that what happens in fact is that each monorepo subproject runs its own biome process. Biome configuration is shared using a biome configuration extension mechanism.

Turbo is responsible for executing biome in each subproject separately.

@endersonmaia
Copy link
Contributor

So, at least define apps/cli/biome.json with root: false

diff --git a/apps/cli/biome.json b/apps/cli/biome.json
index 0d41e4c..1bb079c 100644
--- a/apps/cli/biome.json
+++ b/apps/cli/biome.json
@@ -1,4 +1,5 @@
 {
+    "root": false,
     "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
     "extends": ["../../biome.json"],
     "linter": {

And put the vcs config in the root's biome.json, so we can extent de use of biome to other projects when needed.

@endersonmaia
Copy link
Contributor

Should we also remove .prettierrc.json and .prettierirgnore files ?

@tuler
Copy link
Member Author

tuler commented Jan 13, 2026

So, at least define apps/cli/biome.json with root: false

root: false is a different behavior. Check my latest commit, changed to what you were expecting.

@tuler tuler force-pushed the feature/biome-formatter branch from bc99935 to 79a0901 Compare January 13, 2026 17:28
@tuler tuler merged commit 150b85e into feature/cli-chain-id Jan 13, 2026
6 checks passed
@tuler tuler deleted the feature/biome-formatter branch January 13, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants