From 0d5aa840b6144d614e6623990c3da8990f253ebe Mon Sep 17 00:00:00 2001 From: Hexzii Date: Thu, 12 Feb 2026 05:43:18 +0800 Subject: [PATCH 1/2] docs: update biome configuration specs --- src/content/docs/guides/configure-biome.mdx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/content/docs/guides/configure-biome.mdx b/src/content/docs/guides/configure-biome.mdx index 4d19cf9de..3733c6765 100644 --- a/src/content/docs/guides/configure-biome.mdx +++ b/src/content/docs/guides/configure-biome.mdx @@ -108,6 +108,15 @@ will use the configuration file `app/frontend/biome.json`; Biome (since v2.0.0) supports nested `biome.json` files. For more information, read [Use Biome in big projects](/guides/big-projects#use-multiple-configuration-files). ::: +:::note +Biome commands support the use of the `--config-path` option and the `BIOME_CONFIG_PATH` environment variable. +This allows you to specify a custom configuration file or a directory where Biome can look for a `biome.json` or `biome.jsonc` file. +When using `--config-path` or `BIOME_CONFIG_PATH`, the standard configuration file resolution process is **disabled**. + +If `--config-path` or `BIOME_CONFIG_PATH` point directly to a file, you can use names other than `biome.json` or `biome.jsonc`. +Biome will read a `.json` file using a standard JSON parser. +For files with other extensions, Biome will treat them as `.jsonc` files, using a more flexible JSON parser that allows comments and trailing commas. +::: ## Specifying files to process From 888e9107f70430abac0d99c05488562d97d6a7fa Mon Sep 17 00:00:00 2001 From: Hexzii Date: Thu, 12 Feb 2026 05:53:10 +0800 Subject: [PATCH 2/2] docs: zh-CN for the last commit --- src/content/docs/zh-CN/guides/configure-biome.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/content/docs/zh-CN/guides/configure-biome.mdx b/src/content/docs/zh-CN/guides/configure-biome.mdx index 6ddd695b4..b2f2e6d29 100644 --- a/src/content/docs/zh-CN/guides/configure-biome.mdx +++ b/src/content/docs/zh-CN/guides/configure-biome.mdx @@ -103,6 +103,16 @@ Biome(自 v2.0.0 起)支持嵌套的 `biome.json` 文件。 欲了解更多信息,请阅读[在大型项目中使用 Biome](/zh-cn/guides/big-projects#use-multiple-configuration-files)。 ::: +:::note +Biome 命令支持使用 `--config-path` 选项和 `BIOME_CONFIG_PATH` 环境变量。 +这允许您指定自定义配置文件或 Biome 可以查找 `biome.json` 或 `biome.jsonc` 文件的目录。 +当使用 `--config-path` 或 `BIOME_CONFIG_PATH` 时,标准的配置文件解析过程**将被禁用**。 + +如果 `--config-path` 或 `BIOME_CONFIG_PATH` 直接指向一个文件,您可以使用 `biome.json` 或 `biome.jsonc` 以外的名称。 +Biome 将使用标准的 JSON 解析器读取 `.json` 文件。 +对于其他扩展名的文件,Biome 会将它们视为 `.jsonc` 文件,使用更灵活的 JSON 解析器,允许注释和尾随逗号。 +::: + ## 指定要处理的文件