dprint / dprint-plugin-biome

Adapter plugin to use Biome in dprint's CLI and with JavaScript via Wasm
Other
8 stars 4 forks source link

Crashes when setting lineWidth #5

Closed iamwxq closed 10 months ago

iamwxq commented 10 months ago

when I try to format with biome, I met some errors:

shell outputs: `dprint fmt` ```shell ❯ dprint fmt Critical error formatting D:\dev\vite-project\.eslintrc.cjs. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\dprint.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\biome.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\package.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\tsconfig.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\.vscode\settings.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\tsconfig.node.json. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13c70) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\vite.config.ts. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\src\App.tsx. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\src\main.tsx. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Critical error formatting D:\dev\vite-project\src\vite-env.d.ts. Cannot continue. Message: Originally panicked in dprint-plugin-biome, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date. Original error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Reinitialize error: RuntimeError: unreachable at __rust_start_panic ([4835]:0x2d22cb) at rust_panic ([4826]:0x2d21a7) at std::panicking::rust_panic_with_hook::hc20eadded6bfe687 ([4825]:0x2d2199) at std::panicking::begin_panic_handler::{{closure}}::h82415fe35b0e2001 ([4814]:0x2d1821) at std::sys_common::backtrace::__rust_end_short_backtrace::h71f504d46a203d88 ([4813]:0x2d1744) at rust_begin_unwind ([4820]:0x2d1e07) at core::panicking::panic_fmt::h7a368385936888dc ([4909]:0x2d39f6) at core::result::unwrap_failed::hbe79a418fab461ff ([4956]:0x2db31a) at dprint_plugin_biome::format_text::format_text::h97dfd125e4aff5c3 ([123]:0x13640) at format ([65]:0xdc89) Had 11 error(s) formatting. ```
  1. I'd like to know how to setup dprint and biome, so that they can work together. Should there both two exeutable CLIs in my environment? Or just only dprint enough.

here comes my dprint-biome-plugin settings:

// dprint.json
{
  "biome": {
    "lineEnding": "lf",
    "indentSize": 2,
    "indentStyle": "space",
    "semicolons": "always",
    "quoteStyle": "double",
    "trailingComma": "all",
    "arrowParentheses": "always",
    "quoteProperties": "asNeeded",
    "bracketSameLine": true,
    "bracketSpacing": true
  }
  "plugins": [
     "https://plugins.dprint.dev/biome-0.2.1.wasm",
  ]
}

// biome.json
{
  "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
  "organizeImports": {
    "enabled": true
  },
  "linter": {
    "enabled": true,
    "rules": {
      "recommended": true
    }
  }
}

my dprint version: 0.43.2 my biome version: 1.4.1

  1. I also want to know that if I use dprint-biome-config, should I add dprint-json-config etc. too?

Appreciate any reply!

dsherret commented 10 months ago

What's the contents of d:\dev\vite-project\.eslintrc.cjs? Does it work if you ignore that file? Due to the error message, it seems like it might be a bug in Biome.

dsherret commented 10 months ago

Oh wait, I just realized this is happening for all the files for you. I will look into it.

iamwxq commented 10 months ago

@dsherret I have tried to ignore this file, and then it will say dprint.json error formatting, then biome.json error formatting, and then...

dsherret commented 10 months ago

I haven't been able to reproduce this on a bunch of repos with that config. Initially I thought maybe there was an issue in the config causing the plugin to panic, but that doesn't seem to be the case.

Sorry to bother, but do you have a reproduction repo I could try out?

Also, perhaps this command might show some insight as to what's happening:

> DPRINT_MAX_THREADS=1 dprint fmt --incremental=false --log-level=debug

Should there both two exeutable CLIs in my environment? Or just only dprint enough.

You only need dprint. Dprint will run dprint-plugin-biome sandboxed in a Wasm runtime (so it has no access to the file system).

I also want to know that if I use dprint-biome-config, should I add dprint-json-config etc. too?

I'm guessing what you mean here, but if you have biome then you don't need dprint-plugin-json because biome formats json files.

iamwxq commented 10 months ago

@dsherret

Ok, thank you!!!

You only need dprint. Dprint will run dprint-plugin-biome sandboxed in a Wasm runtime (so it has no access to the file system).

So is there need a biome.json in my project?


By the way, I find the reason that if I set both lineWidth and biome, there will be errors

iamwxq commented 10 months ago

Sorry to bother, but do you have a reproduction repo I could try out?

if you need, here comes: https://github.com/iamwxq/dprint-biome-repo

In fact, you just need set both lineWidth and biome in the dprint.json

dsherret commented 10 months ago

Thanks for the information that helped to reproduce this, @iamwxq!

I have published a new version (0.2.2) with the fix and if you run dprint config update it should automatically update your configuration file for you. It was a silly mistake I made.

So is there need a biome.json in my project?

No, since dprint runs dprint-plugin-biome in a sandboxed environment, the plugin doesn't have access to read from the file system in order to access the config. The config must be specified in the dprint.json file so that the dprint CLI can pass the configuration to the plugin. You only need to specify the url in the plugins array and then a "biome" config in the dprint.json file and everything should just work.