From 5bd841f2629dff3d25f5d83a5a0712e76ab7a78c Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Tue, 23 Apr 2024 17:17:02 +0200 Subject: [PATCH] docs: improve guides, add 'Migrate from' page --- astro.config.ts | 4 + src/content/docs/guides/getting-started.mdx | 42 ++-- .../docs/guides/integrate-in-editor.mdx | 10 +- src/content/docs/guides/integrate-in-vcs.mdx | 19 +- .../docs/guides/manual-installation.mdx | 29 +-- .../docs/guides/migrate-eslint-prettier.mdx | 194 ++++++++++++++++++ .../docs/ja/guides/getting-started.mdx | 11 +- .../docs/ja/guides/manual-installation.mdx | 23 +-- .../docs/pt-br/guides/getting-started.mdx | 11 +- .../docs/pt-br/guides/manual-installation.mdx | 23 +-- .../docs/zh-cn/guides/getting-started.mdx | 11 +- .../docs/zh-cn/guides/manual-installation.mdx | 23 +-- 12 files changed, 283 insertions(+), 117 deletions(-) create mode 100644 src/content/docs/guides/migrate-eslint-prettier.mdx diff --git a/astro.config.ts b/astro.config.ts index 898a190df..96212aac8 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -110,6 +110,10 @@ export default defineConfig({ "pt-BR": "Integrando o Biome com o seu VCS", }, }, + { + label: "Migrate from ESLint and Prettier", + link: "/guides/migrate-eslint-prettier", + }, ], }, { diff --git a/src/content/docs/guides/getting-started.mdx b/src/content/docs/guides/getting-started.mdx index ebcfa662c..61dcab299 100644 --- a/src/content/docs/guides/getting-started.mdx +++ b/src/content/docs/guides/getting-started.mdx @@ -6,15 +6,12 @@ description: Learn how to set up a new project with Biome. import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; import PackageManagerCommand from "@/components/PackageManagerCommand.astro"; -## System Requirements - -- Windows (including WSL), macOS, or Linux -- x86_64 or ARM64 -- Node.js v14.18 or newer (not applicable if you use the standalone executable) - ## Installation -The fastest way to download Biome is to use `npm` or your preferred package manager. The CLI is also available as a [standalone executable](/guides/manual-installation) if you want to use Biome without installing Node.js. +The fastest way to download Biome is to use `npm` or your preferred package manager. +This requires Node.js v14.18 or newer. + +The CLI is also available as a [standalone executable](/guides/manual-installation) if you want to use Biome without installing Node.js. To install Biome, run the following commands in a directory containing a `package.json` file. @@ -25,19 +22,15 @@ To install Biome, run the following commands in a directory containing a `packag bun="add --dev --exact @biomejs/biome" /> -:::note -It is also possible to install Biome globally rather than locally. -However, this is not recommended. -::: - -It's **highly recommended** not to use range operators when installing Biome. -Check the [versioning page](/internals/versioning/) for more information. +It's **highly recommended** not to use a range operator when installing Biome. +See the [versioning page](/internals/versioning/) for more information. ## Configuration -We recommend creating a `biome.json` configuration file for each project. -It eliminates the need to repeat the CLI options every time you run a command and ensures that Biome applies the same configuration in your editor. If you're happy with Biome's defaults, you don't have to create the configuration. - +We recommend that you create a `biome.json` configuration file for each project. +This eliminates the need to repeat the CLI options each time you run a command, +and ensures that Biome uses the same configuration in your editor. +If you are happy with Biome's defaults, you don't need to create the configuration. To create the configuration, run the `init` command in the root folder of your project: @@ -84,26 +77,25 @@ You can apply **both** of them by leveraging the [`check`](/reference/cli#biome- -The command `check` is command meant to run multiple tools at once. Currently, it does: - -- format files -- lint files -- organize imports +The `check` command runs multiple tools at once. +It fomats, lints, and organizes imports. ## Install an editor plugin -We recommend installing an editor plugin to get the most out of Biome. Check out the [editor page](/guides/integrate-in-editor) to know which editors support Biome. +We recommend installing an editor plugin to get the most out of Biome. +Check out the [editor page](/guides/integrate-in-editor) to know which editors support Biome. ## CI Setup -If you're using Node.js, the recommended way to run Biome in CI is to use [your favourite package manager](/guides/getting-started#installation). +If you're using Node.js, the recommended way to run Biome in CI is to use [your preferred package manager](/guides/getting-started#installation). This ensures that your CI pipeline uses the same version of Biome as you do inside the editor or when running local CLI commands. -Alternatively, you can use dedicated [CI Actions](/recipes/continuous-integration/). +Alternatively, you can use a dedicated [CI Action](/recipes/continuous-integration). ## Next Steps Success! You're now ready to use Biome. 🥳 +- [Migrate from ESLint and Prettier](/guides/migrate-eslint-prettier) - Learn more about how to use and configure the [formatter](/formatter) - Learn more about how to use and configure the [linter](/linter) - Get familiar with the [CLI options](/reference/cli) diff --git a/src/content/docs/guides/integrate-in-editor.mdx b/src/content/docs/guides/integrate-in-editor.mdx index 3e1783a6f..f0afcbb47 100644 --- a/src/content/docs/guides/integrate-in-editor.mdx +++ b/src/content/docs/guides/integrate-in-editor.mdx @@ -11,17 +11,17 @@ These are plugins that are maintained by the Biome team and part of the [Biome o The Biome editor integration allows you to: -* Format files on save or when issuing the Format command. +* Format files on save or when issuing the _Format_ command. * Lint files and apply code fixes Install our official [Biome VS Code extension](https://marketplace.visualstudio.com/items?itemName=biomejs.biome) from the Visual Studio Marketplace. To make Biome the default formatter open a [supported file](/internals/language-support/) and: -* open the *Command Palette* (View or Ctrl/++P) -* select *Format Document With...* -* select *Configure Default Formatter* -* select *Biome*. +1. open the *Command Palette* (View or Ctrl/++P) +1. select *Format Document With...* +1. select *Configure Default Formatter* +1. select *Biome*. ### IntelliJ diff --git a/src/content/docs/guides/integrate-in-vcs.mdx b/src/content/docs/guides/integrate-in-vcs.mdx index f50e388fa..100079523 100644 --- a/src/content/docs/guides/integrate-in-vcs.mdx +++ b/src/content/docs/guides/integrate-in-vcs.mdx @@ -21,7 +21,9 @@ This configuration doesn't do **anything per se**. You have to opt-in new featur ### Use the ignore file -This is a feature that allows Biome to read the ignore file of the VCS and ignore all the files and folders that were specified in it. This is an opt-in feature, and you have to enable the `vcs.useIgnoreFile` field: +This is a feature that allows Biome to read the ignore file of the VCS and ignore all the files and folders that were specified in it. +For now, Biome only **takes the ignore file in the working directory into account**. +This is an opt-in feature, and you have to enable the `vcs.useIgnoreFile` field: ```json title="biome.json" ins={5} { @@ -53,7 +55,7 @@ First, you have to update your configuration file and tell Biome what's the defa Then, add the `--changed` option to your command, to process only those files that your VCS acknowledged as "changed". Biome, with the help of the VCS, will determine the changed file from the branch `main` and your current revision: ```shell -biome format --changed +biome check --changed ``` :::caution @@ -63,5 +65,16 @@ Biome doesn't check what's changed, this means that even adding spaces or newlin Alternatively, you can use the option `--since` to specify an arbitrary branch. This option **takes precedence** over the option `vcs.defaultBranch`. For example, you might want to check your changes against the `next` branch: ```shell -biome format --changed --since=next +biome check --changed --since=next ``` + +### Process only staged files + +Before committing your changes, you may want to check the formatting and lints files that have been added to the _index_, also known as _staged files_. +Add the `--staged` option to your command, to process only those files: + +```shell +biome check --staged +``` + +The `--staged' option is not available on the `ci' command because you are not expected to commit changes in a CI environment. diff --git a/src/content/docs/guides/manual-installation.mdx b/src/content/docs/guides/manual-installation.mdx index 2788ce07a..795739c15 100644 --- a/src/content/docs/guides/manual-installation.mdx +++ b/src/content/docs/guides/manual-installation.mdx @@ -3,29 +3,14 @@ title: Manual installation description: Install the Biome manually --- -## Use Biome without Node.js - -Using Biome's standalone CLI binary can be a great choice if you aren't already using Node or npm (or any other package manager). +Using Biome's standalone CLI binary can be a great choice if you aren't already using Node.js or `npm` (or any other package manager). Or in other words, Biome shouldn't be the only reason for you to have a `package.json`. :::note -If you're already using npm or another package manager, then using the package manager is the [preferred way to install](/guides/getting-started#installation) Biome. +If you're already using `npm` or another package manager, then using the package manager is the [preferred way to install](/guides/getting-started#installation) Biome. You're already familiar with the tooling, and installing and updating are simpler. ::: -### Homebrew - -Biome is available as a [Homebrew formula](https://formulae.brew.sh/formula/biome) for macOS and Linux users. - -```shell -brew install biome -``` - -## System Requirements - -- Windows (including WSL), macOS, or Linux -- x86_64 or ARM64 - ## Supported platforms You have to pick the correct binary for your platform for Biome work. The following table should help you do so. @@ -39,7 +24,15 @@ You have to pick the correct binary for your platform for Biome work. The follow Use the Linux variant for Windows Subsystem for Linux (WSL). ::: -## Install Biome +## Homebrew + +Biome is available as a [Homebrew formula](https://formulae.brew.sh/formula/biome) for macOS and Linux users. + +```shell +brew install biome +``` + +## Using a published binary To install Biome, grab the executable for your platform from the [latest CLI release](https://github.com/biomejs/biome/releases) on GitHub and give it execution permission. diff --git a/src/content/docs/guides/migrate-eslint-prettier.mdx b/src/content/docs/guides/migrate-eslint-prettier.mdx new file mode 100644 index 000000000..3f2224b38 --- /dev/null +++ b/src/content/docs/guides/migrate-eslint-prettier.mdx @@ -0,0 +1,194 @@ +--- +title: Migrate from ESLint and Prettier +description: Learn how you can ease your migration from ESLint and Prettier +--- + +import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; + +Biome provides dedicated commands to ease the migration from ESLint and Prettier. + +## Migrate from ESLint + +Many Biome linter rules are inspired by or identical to the ESLint rules or the rules of an ESLint plugin. +We handle some ESLint plugins such as [TypeScript ESLint](https://typescript-eslint.io/), [ESLint JSX A11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), [ESLint React](https://github.com/jsx-eslint/eslint-plugin-react), and [ESLint Unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn). +However, Biome has its own naming convention for its rules. +Biome uses `camelCaseRuleName` while ESLint uses `kebab-case-rule-name`. +Moreover, Biome has often chosen to use different names to better convey the intent of its rules. +The source of a rule can be found on the page describing the rule. +You can also find the equivalent Biome rule from an ESLint rule using the [dedicated page](/linter/rules-sources). + +To ease the migration, Biome provides the `biome migrate eslint` subcommand. +This subcommand will read your ESLint configuration and attempt to port its settings to Biome. +The subcommand is able to handle both the legacy and the flat configuration files. +It supports the `extends` field of the legacy configuration and loads both shared and plugin configurations. +The subcommand also migrates `.eslintignore`. + +Given the following ESLint configuration: + +```json title=".eslintrc.json" +{ + "extends": ["plugin:unicorn/recommended"], + "plugins": ["unicorn"], + "ignore_patterns": ["dist/**"], + "globals": { + "Global1": "readonly" + }, + "rules": { + "eqeqeq": "error" + }, + "overrides": [ + { + "files": ["tests/**"], + "rules": { + "eqeqeq": "off" + } + } + ] +} +``` + +And the following Biome configuration: + +```json title="biome.json" +{ + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + } +} +``` + +Run the following command to migrate your ESLint configuration to Biome. + + + +The subcommand overwrites your initial Biome configuration. +For example, it disables `recommended`. +This results in the following Biome configuration: + +```json title="biome.json" +{ + "organizeImports": { "enabled": true }, + "linter": { + "enabled": true, + "rules": { + "recommended": false, + "complexity": { + "noForEach": "error", + "noStaticOnlyClass": "error", + "noUselessSwitchCase": "error", + "useFlatMap": "error" + }, + "style": { + "noNegationElse": "off", + "useForOf": "error", + "useNodejsImportProtocol": "error", + "useNumberNamespace": "error" + }, + "suspicious": { + "noDoubleEquals": "error", + "noThenProperty": "error", + "useIsArray": "error" + } + } + }, + "javascript": { "globals": ["Global1"] }, + "overrides": [ + { + "include": ["tests/**"], + "linter": { "rules": { "suspicious": { "noDoubleEquals": "off" } } } + } + ] +} +``` + +The subcommand needs Node.js to load and resolve all the plugins and `extends` configured in the ESLint configuration file. +For now, `biome migrate eslint` doesn't support configuration written in YAML. + +By default, Biome doesn't migrate inspired rules. +You can use the CLI flag `--include-inspired` to migrate them. + + + +Note that you are unlikely to get exactly the same behavior as ESLint because Biome has chosen not to implement some rule options or to deviate slightly from the original implementation. + +Since ESLint takes VCS ignore files into account, +we recommend that you enable Biome's [VCS integration](/guides/integrate-in-vcs). + +:::caution +Some plugins or shared configurations may export an object with a cyclic reference. +Biome may fail to load such a configuration. +::: + +## Migrate from Prettier + +Biome tries to match the Prettier formatter as closely as possible. +However, Biome uses different defaults for its formatter. +For example, it uses tabs for indentation instead of spaces. +You can easily migrate to Biome by running `biome migrate prettier --write`. + +Given the following Prettier configuration: + +```json title=".prettierrc.json" +{ + "useTabs": false, + "singleQuote": true, + "overrides": [ + { + "files": ["*.json"], + "options": { "tabWidth": 2 } + } + ] +} +``` + +Run the following command to migrate your Prettier configuration to Biome. + + + +This results in the following Biome configuration: + +```json title="biome.json" +{ + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 80, + "attributePosition": "auto" + }, + "organizeImports": { "enabled": true }, + "linter": { "enabled": true, "rules": { "recommended": true } }, + "javascript": { + "formatter": { + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "trailingComma": "all", + "semicolons": "asNeeded", + "arrowParentheses": "always", + "bracketSpacing": true, + "bracketSameLine": false, + "quoteStyle": "single", + "attributePosition": "auto" + } + }, + "overrides": [ + { + "include": ["*.json"], + "formatter": { + "indentWidth": 2 + } + } + ] +} +``` + +The subcommand needs Node.js to load JavaScript configurations such as `.prettierrc.js`. +`biome migrate prettier` doesn't support configuration written in JSON5, TOML, or YAML. + +Since Prettier takes VCS ignore files into account, +we recommend that you enable Biome's [VCS integration](/guides/integrate-in-vcs). diff --git a/src/content/docs/ja/guides/getting-started.mdx b/src/content/docs/ja/guides/getting-started.mdx index b0f0838b0..ff2e39cfb 100644 --- a/src/content/docs/ja/guides/getting-started.mdx +++ b/src/content/docs/ja/guides/getting-started.mdx @@ -6,15 +6,12 @@ description: Biomeと共に新しいプロジェクトを立ち上げる方法 import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; import PackageManagerCommand from "@/components/PackageManagerCommand.astro"; -## 動作環境 - -- Windows(WSLを含む)、macOS、またはLinux -- x86_64またはARM64 -- Node.js v14.18以上(スタンドアロン実行形式を使用する場合は不要) - ## インストール方法 -Biomeをインストールする最も速い方法は、 `npm` またはお好みのパッケージマネージャーを使用することです。Node.jsをインストールせずにBiomeを使用したい場合は、[スタンドアロン実行形式](/ja/guides/manual-installation)としてCLIを利用できます。 +Biomeをインストールする最も速い方法は、 `npm` またはお好みのパッケージマネージャーを使用することです。 +これにはNode.js v14.18以降が必要です。 + +Node.jsをインストールせずにBiomeを使用したい場合は、[スタンドアロン実行形式](/ja/guides/manual-installation)としてCLIを利用できます。 Biomeをインストールするには、 `package.json` ファイルが含まれるディレクトリで次のコマンドを実行します。 diff --git a/src/content/docs/ja/guides/manual-installation.mdx b/src/content/docs/ja/guides/manual-installation.mdx index a32a20173..feb55969c 100644 --- a/src/content/docs/ja/guides/manual-installation.mdx +++ b/src/content/docs/ja/guides/manual-installation.mdx @@ -3,8 +3,6 @@ title: 手動インストール description: Biome を手動でインストールする --- -## Biome を Node.js を使わずに使用する - もしあなたが Node.js や npm(あるいは他のパッケージマネージャー)を使用してない場合、代わりに Biome のスタンドアロンなCLIバイナリを使用できます。 言い換えれば、`package.json` を持たずに Biome を利用できます。 @@ -13,19 +11,6 @@ description: Biome を手動でインストールする 慣れているツールの利用は、インストールや更新を簡単にします。 ::: -### Homebrew - -Biome は macOS と Linux ユーザー向けに [Homebrew formula](https://formulae.brew.sh/formula/biome) から利用可能です。 - -```shell -brew install biome -``` - -## システム要件 - -- Windows(WSL 含む), macOS, または Linux -- x86_64 または ARM64 - ## サポートされるプラットフォーム Biomeを動作させるためには、プラットフォームに適したバイナリを選択する必要があります。次の表を参考にしてください。 @@ -39,6 +24,14 @@ Biomeを動作させるためには、プラットフォームに適したバイ Windows Subsystem for Linux (WSL) の場合は、Linux版を使用してください。 ::: +## Homebrew + +Biome は macOS と Linux ユーザー向けに [Homebrew formula](https://formulae.brew.sh/formula/biome) から利用可能です。 + +```shell +brew install biome +``` + ## Biomeのインストール Biome をインストールするには、GitHub上の[最新のCLIリリース](https://github.com/biomejs/biome/releases) からプラットフォームに合った実行可能ファイルを取得し、実行権限を与えてください。 diff --git a/src/content/docs/pt-br/guides/getting-started.mdx b/src/content/docs/pt-br/guides/getting-started.mdx index 5d5b29c89..05b623b6c 100644 --- a/src/content/docs/pt-br/guides/getting-started.mdx +++ b/src/content/docs/pt-br/guides/getting-started.mdx @@ -6,15 +6,12 @@ description: Aprenda a criar um novo projeto com Biome. import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; import PackageManagerCommand from "@/components/PackageManagerCommand.astro"; -## Requisitos - -- Windows (incluindo WSL), macOS, ou Linux -- x86_64 ou ARM64 -- Node.js v14.18 ou mais recente (não aplicável se você utilizar o executável independente) - ## Instalação -A forma mais rápida de baixar o Biome é usando `npm` ou o seu package manager favorito. O CLI também está disponível como um [executável independente](/guides/manual-installation) caso você queira usar Biome sem instalar o Node.js. +A forma mais rápida de baixar o Biome é usando `npm` ou o seu package manager favorito. +Isso requer o Node.js v14.18 ou mais recente. + +O CLI também está disponível como um [executável independente](/guides/manual-installation) caso você queira usar Biome sem instalar o Node.js. Para instalar o Biome, execute o seguinte comando em um diretório que possua o arquivo `package.json`. diff --git a/src/content/docs/pt-br/guides/manual-installation.mdx b/src/content/docs/pt-br/guides/manual-installation.mdx index f83a9ad89..4866cccf6 100644 --- a/src/content/docs/pt-br/guides/manual-installation.mdx +++ b/src/content/docs/pt-br/guides/manual-installation.mdx @@ -3,8 +3,6 @@ title: Instalação manual description: Instale o Biome de forma manual --- -## Usando o Biome sem Node.js - Utlizar a CLI independente do Biome é uma boa alternativa caso você ainda não esteja usando Node, npm ou qualquer outro gerenciador de pacotes. Em outras palavras, o Biome não deve ser a única razão para você ter um `package.json`. @@ -13,19 +11,6 @@ Se você já estiver utilizando npm ou outro gerenciador de pacotes, usar ele é Provavelmente, você já está familiarizado com ele, tornando a instalação e atualização mais simples. ::: -### Homebrew - -O Biome está disponível no [Homebrew](https://formulae.brew.sh/formula/biome) para usuários macOS e Linux. - -```shell -brew install biome -``` - -## Requisitos - -- Windows (incluindo WSL), macOS ou Linux -- Arquitetura x86_64 ou ARM64 - ## Arquiteturas suportadas Você precisa escolher o binário correto para a sua arquitetura para que o Biome funcione. A tabela a seguir deve ajudá-lo a fazer isso. @@ -39,6 +24,14 @@ Você precisa escolher o binário correto para a sua arquitetura para que o Biom Utilize a versão Linux para o Windows Subsystem for Linux (WSL). ::: +## Homebrew + +O Biome está disponível no [Homebrew](https://formulae.brew.sh/formula/biome) para usuários macOS e Linux. + +```shell +brew install biome +``` + ## Instalando o Biome Para instalar o Biome, baixe o [executável mais recente](https://github.com/biomejs/biome/releases) para a sua arquitetura no GitHub e conceda permissão de execução a ele. diff --git a/src/content/docs/zh-cn/guides/getting-started.mdx b/src/content/docs/zh-cn/guides/getting-started.mdx index 69cf625c9..93b1856ac 100644 --- a/src/content/docs/zh-cn/guides/getting-started.mdx +++ b/src/content/docs/zh-cn/guides/getting-started.mdx @@ -6,15 +6,12 @@ description: 学习如何使用Biome设置新项目。 import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro"; import PackageManagerCommand from "@/components/PackageManagerCommand.astro"; -## 系统要求 - -- Windows(包括WSL)、macOS或Linux -- x86_64或ARM64 -- Node.js v14.18或更新版本(如果使用独立可执行文件则不适用) - ## 安装 -下载Biome的最快方法是使用`npm`或您偏好的包管理器。如果您想在不安装Node.js的情况下使用Biome,CLI也可作为[独立可执行文件](/guides/manual-installation)使用。 +下载Biome的最快方法是使用`npm`或您偏好的包管理器。 +这需要 Node.js v14.18 或更新版本。 + +如果您想在不安装Node.js的情况下使用Biome,CLI也可作为[独立可执行文件](/guides/manual-installation)使用。 要安装Biome,请在包含`package.json`文件的目录中运行以下命令。 diff --git a/src/content/docs/zh-cn/guides/manual-installation.mdx b/src/content/docs/zh-cn/guides/manual-installation.mdx index ca741ac1c..ce5585c6d 100644 --- a/src/content/docs/zh-cn/guides/manual-installation.mdx +++ b/src/content/docs/zh-cn/guides/manual-installation.mdx @@ -3,8 +3,6 @@ title: 手动安装 description: 手动安装Biome --- -## 在没有Node.js的情况下使用Biome - 如果您还没有使用Node或npm(或任何其他软件包管理器),那么使用Biome的独立CLI二进制文件可能是一个很好的选择。 换句话说,Biome不应该是您拥有`package.json`的唯一原因。 @@ -13,19 +11,6 @@ description: 手动安装Biome 您已经熟悉工具链,并且安装和更新更加简单。 ::: -### Homebrew - -Biome可以作为[Homebrew formula](https://formulae.brew.sh/formula/biome)提供给macOS和Linux用户。 - -```shell -brew install biome -``` - -## 系统要求 - -- Windows(包括WSL),macOS或Linux -- x86_64或ARM64 - ## 支持的平台 你必须为你的平台选择正确的二进制文件才能使用Biome。下表将帮助您完成此操作。 @@ -37,6 +22,14 @@ brew install biome > 注意:在Windows Subsystem for Linux (WSL)中使用Linux变体 +## Homebrew + +Biome可以作为[Homebrew formula](https://formulae.brew.sh/formula/biome)提供给macOS和Linux用户。 + +```shell +brew install biome +``` + ## 安装Biome 要安装Biome,请从GitHub的[最新CLI版本](https://github.com/biomejs/biome/releases)中获取适用于您平台的可执行文件,并给它执行权限。