@biomejs/biome 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE-APACHE CHANGED
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright (c) 2023 Biome Developers and Contributors.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -198,4 +198,4 @@ Unless required by applicable law or agreed to in writing, software
198
198
  distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
- limitations under the License.
201
+ limitations under the License.
package/README.ja.md ADDED
@@ -0,0 +1,121 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-dark-transparent.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg">
5
+ <img alt="Biome - Toolchain of the web" src="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg" width="700">
6
+ </picture>
7
+ </p>
8
+
9
+ <div align="center">
10
+
11
+ [![Discord chat][discord-badge]][discord-url]
12
+ [![CI on main][ci-badge]][ci-url]
13
+ [![npm version][npm-badge]][npm-url]
14
+ [![VSCode version][vscode-badge]][vscode-url]
15
+ [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
+
17
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
+ [discord-url]: https://discord.gg/BypW39g6Yc
19
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
22
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
23
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
24
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
25
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
26
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
27
+
28
+ </div>
29
+
30
+ <div align="center">
31
+
32
+ [English](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.md) | [简体中文](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.zh-CN.md) | 日本語 | [Português do Brasil](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.pt-br.md)
33
+
34
+ </div>
35
+
36
+ **Biome** はWebプロジェクトのための高性能なツールチェーンであり、プロジェクトの健全性を維持するための開発者ツールの提供を目的としています。
37
+
38
+ **Biome は _JavaScript_, _TypeScript_, _JSX_ そして _JSON_ 向けの[高速なFormatter](./benchmark#formatting)**であり、**[_Prettier_ との互換性は97%](https://console.algora.io/challenges/prettier)** を達成しています。
39
+
40
+ **Biome は _JavaScript_, _TypeScript_, _JSX_ のための[高性能なLinter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** であり、ESLint, TypeScript ESLint, [その他のソース](https://github.com/biomejs/biome/discussions/3)から **[170以上のルール](https://biomejs.dev/linter/rules/)**を提供しています。Biome は**詳細で文脈に沿った結果を出力**するため、コードを改善し、より良いプログラマになるための手助けをします!
41
+
42
+ **Biome** は最初から[**エディタ内で対話的に**](https://biomejs.dev/ja/guides/integrate-in-editor/)使用できるように設計されています。
43
+ あなたがコードを書いているときに、形の崩れたコードを format と lint することができます。
44
+
45
+ ### インストール
46
+
47
+ ```shell
48
+ npm install --save-dev --save-exact @biomejs/biome
49
+ ```
50
+
51
+ ### 使い方
52
+
53
+ ```shell
54
+ # ファイルをformatする
55
+ npx @biomejs/biome format --write ./src
56
+
57
+ # ファイルをlintする
58
+ npx @biomejs/biome lint ./src
59
+
60
+ # format、lintなどを実行し、安全な提案を適用する
61
+ npx @biomejs/biome check --apply ./src
62
+
63
+ # CI環境では、すべてのファイルを対象にformatやlintをチェックする
64
+ npx @biomejs/biome ci ./src
65
+ ```
66
+
67
+ Biome をインストールせずに試したい場合は、WebAssembly にコンパイルされた[オンラインのプレイグラウンド](https://biomejs.dev/playground/)を利用してください。
68
+
69
+ ## ドキュメント
70
+
71
+ Biome についてもっと知るために[ホームページ][biomejs]をチェックするか、Biome を使い始めるために[はじめる][getting-started]に進んでください。
72
+
73
+ ## Biome をもっと詳しく
74
+
75
+ **Biome** は理にかなったデフォルト設定を持ち、設定を必要としません。
76
+
77
+ **Biome** はモダンなウェブ開発における[全ての主要な言語][language-support]をサポートすることを目指しています。
78
+
79
+ **Biome** は動作するために Node.js を必要としません。
80
+
81
+ **Biome** はソーステキストの完全な表現力とエラー回復能力を持つ洗練されたParserによって、優れたLSPサポートを提供します。
82
+
83
+ **Biome** は以前は別々のツールで提供されていた機能を統合します。共通基盤を構築することで、コードの処理、エラーの表示、並列処理、キャッシュ、設定について統一的な体験を提供します。
84
+
85
+ 興味のある方は、[プロジェクトの理念][biome-philosophy]もご覧ください。
86
+
87
+ **Biome** は [MIT ライセンス](https://github.com/biomejs/biome/tree/main/LICENSE-MIT)または [Apache 2.0 ライセンス](https://github.com/biomejs/biome/tree/main/LICENSE-APACHE)であり、[コントリビューター行動規範](https://github.com/biomejs/biome/tree/main/CODE_OF_CONDUCT.md)の下で管理されています。
88
+
89
+ ## スポンサー
90
+
91
+ ### ゴールドスポンサー
92
+
93
+ <table>
94
+ <tbody>
95
+ <tr>
96
+ <td align="center" valign="middle">
97
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
98
+ </td>
99
+ </tr>
100
+ </tbody>
101
+ </table>
102
+
103
+ ### ブロンズスポンサー
104
+
105
+ <table>
106
+ <tbody>
107
+ <tr>
108
+ <td align="center" valign="middle">
109
+ <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
110
+ </td>
111
+ <td align="center" valign="middle">
112
+ <a href="https://nanabit.dev/" target="_blank"><img src="https://images.opencollective.com/nanabit/d15fd98/logo/256.png?height=80" width="80"></a>
113
+ </td>
114
+ </tr>
115
+ </tbody>
116
+ </table>
117
+
118
+ [biomejs]: https://biomejs.dev/ja/
119
+ [biome-philosophy]: https://biomejs.dev/ja/internals/philosophy/
120
+ [language-support]: https://biomejs.dev/ja/internals/language-support/
121
+ [getting-started]: https://biomejs.dev/ja/guides/getting-started/
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  <p align="center">
2
- <img alt="Biome - Toolchain of the web"
3
- src="https://raw.githubusercontent.com/biomejs/resources/main/biome-logo-slogan.svg"
4
- width="400">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-dark-transparent.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg">
5
+ <img alt="Shows the banner of Biome, with its logo and the phrase 'Biome - Toolchain of the web'." src="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg" width="700">
6
+ </picture>
5
7
  </p>
6
8
 
7
9
  <div align="center">
@@ -23,14 +25,19 @@
23
25
  [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
24
26
  [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
25
27
 
28
+ </div>
29
+
30
+ <div align="center">
31
+
32
+ English | [简体中文](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.zh-CN.md) | [日本語](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.ja.md) | [Português do Brasil](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.pt-br.md)
26
33
 
27
34
  </div>
28
35
 
29
36
  **Biome** is a performant toolchain for web projects, it aims to provide developer tools to maintain the health of said projects.
30
37
 
31
- **Biome is a [fast formatter](./benchmark#formatting)** for _JavaScript_, _TypeScript_, _JSX_, and _JSON_ that scores **[96% compatibility with _Prettier_](https://console.algora.io/challenges/prettier)**.
38
+ **Biome is a [fast formatter](./benchmark#formatting)** for _JavaScript_, _TypeScript_, _JSX_, and _JSON_ that scores **[97% compatibility with _Prettier_](https://console.algora.io/challenges/prettier)**.
32
39
 
33
- **Biome is a [performant linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** for _JavaScript_, _TypeScript_, and _JSX_ that features **[more than 170 rules](https://biomejs.dev/linter/rules/)** from ESLint, TypeSCript ESLint, and [other sources](https://github.com/biomejs/biome/discussions/3).
40
+ **Biome is a [performant linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)** for _JavaScript_, _TypeScript_, and _JSX_ that features **[more than 190 rules](https://biomejs.dev/linter/rules/)** from ESLint, TypeScript ESLint, and [other sources](https://github.com/biomejs/biome/discussions/3).
34
41
  It **outputs detailed and contextualized diagnostics** that help you to improve your code and become a better programmer!
35
42
 
36
43
  **Biome** is designed from the start to be used [interactively within an editor](https://biomejs.dev/guides/integrate-in-editor/).
@@ -103,11 +110,13 @@ Read more about our [project philosophy][biome-philosophy].
103
110
  <td align="center" valign="middle">
104
111
  <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
105
112
  </td>
113
+ <td align="center" valign="middle">
114
+ <a href="https://nanabit.dev/" target="_blank"><img src="https://images.opencollective.com/nanabit/d15fd98/logo/256.png?height=80" width="80"></a>
115
+ </td>
106
116
  </tr>
107
117
  </tbody>
108
118
  </table>
109
119
 
110
- [bench]: https://github.com/biomejs/biome/blob/main/benchmark/README.md
111
120
  [biomejs]: https://biomejs.dev/
112
121
  [biome-philosophy]: https://biomejs.dev/internals/philosophy/
113
122
  [language-support]: https://biomejs.dev/internals/language-support/
@@ -0,0 +1,125 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-dark-transparent.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg">
5
+ <img alt="Biome - Conjunto de ferramentas da web" src="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg" width="700">
6
+ </picture>
7
+ </p>
8
+
9
+ <div align="center">
10
+
11
+ [![Chat no Discord][discord-badge]][discord-url]
12
+ [![CI na `main`][ci-badge]][ci-url]
13
+ [![versão npm][npm-badge]][npm-url]
14
+ [![versão VSCode][vscode-badge]][vscode-url]
15
+ [![versão Open VSX][open-vsx-badge]][open-vsx-url]
16
+
17
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
+ [discord-url]: https://discord.gg/BypW39g6Yc
19
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
22
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
23
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
24
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
25
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
26
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
27
+
28
+ </div>
29
+
30
+ <div align="center">
31
+
32
+ [English](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.md) | [简体中文](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.zh-CN.md) | [日本語](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.ja.md) | Português do Brasil
33
+
34
+ </div>
35
+
36
+ **Biome** é um conjunto de ferramentas de alto desempenho para projetos web, visando fornecer recursos de desenvolvimento para manter a saúde desses projetos.
37
+
38
+ **Biome é um [formatador rápido](./benchmark#formatting)** para _JavaScript_, _TypeScript_, _JSX_, e _JSON_ que atinge **[97% de compatibilidade com o _Prettier_](https://console.algora.io/challenges/prettier)**.
39
+
40
+ **Biome é um [linter eficiente](https://github.com/biomejs/biome/tree/main/benchmark#linting)** para _JavaScript_, _TypeScript_, e _JSX_ que possui **[mais de 190 regras](https://biomejs.dev/linter/rules/)** do ESLint, TypeScript ESLint, e de [outras fontes](https://github.com/biomejs/biome/discussions/3).
41
+ Ele **fornece diagnósticos detalhados e contextualizados** que ajudam você a melhorar seu código e se tornar um programador melhor!
42
+
43
+ **Biome** é projetado desde o início para ser usado [interativamente dentro de um editor](https://biomejs.dev/guides/integrate-in-editor/).
44
+ Isso permite formatar e lintar códigos malformados enquanto você programa.
45
+
46
+ ### Instalação
47
+
48
+ ```shell
49
+ npm install --save-dev --save-exact @biomejs/biome
50
+ ```
51
+
52
+ ### Uso
53
+
54
+ ```shell
55
+ # formatar arquivos
56
+ npx @biomejs/biome format --write ./src
57
+
58
+ # lintar arquivos
59
+ npx @biomejs/biome lint ./src
60
+
61
+ # executar formatação, lint, etc. e aplicar as sugestões seguras
62
+ npx @biomejs/biome check --apply ./src
63
+
64
+ # verificar todos os arquivos contra formatação, lint, etc. em ambientes CI
65
+ npx @biomejs/biome ci ./src
66
+ ```
67
+
68
+ Se você quiser experimentar o Biome sem instalá-lo, use o [playground online](https://biomejs.dev/playground/), compilado para WebAssembly.
69
+
70
+ ## Documentação
71
+
72
+ Confira nossa [página inicial][biomejs] para saber mais sobre o Biome,
73
+ ou vá ao [Guia de Introdução][getting-started] para começar a usar o Biome.
74
+
75
+ ## Mais sobre o Biome
76
+
77
+ **Biome** tem padrões robustos e não requer configuração.
78
+
79
+ **Biome** visa suportar [todas as principais linguagens][language-support] do desenvolvimento web moderno.
80
+
81
+ **Biome** [não requer Node.js](https://biomejs.dev/guides/manual-installation/) para funcionar.
82
+
83
+ **Biome** tem suporte de primeira linha para LSP, com um
84
+
85
+ parser sofisticado que representa o texto-fonte em sua total fidelidade e recuperação de erro de ponta.
86
+
87
+ **Biome** unifica funcionalidades que anteriormente eram ferramentas separadas. Construindo sobre uma base compartilhada, podemos fornecer uma experiência coesa para processar código, exibir erros, paralelizar trabalho, cache e configuração.
88
+
89
+ Leia mais sobre nossa [filosofia de projeto][biome-philosophy].
90
+
91
+ **Biome** é licenciado sob [MIT](https://github.com/biomejs/biome/tree/main/LICENSE-MIT) ou [Apache 2.0](https://github.com/biomejs/biome/tree/main/LICENSE-APACHE) e moderado sob o [Código de Conduta do Contribuidor](https://github.com/biomejs/biome/tree/main/CODE_OF_CONDUCT.md).
92
+
93
+ ## Patrocinadores
94
+
95
+ ### Patrocinadores Ouro
96
+
97
+ <table>
98
+ <tbody>
99
+ <tr>
100
+ <td align="center" valign="middle">
101
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
102
+ </td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+
107
+ ### Patrocinadores Bronze
108
+
109
+ <table>
110
+ <tbody>
111
+ <tr>
112
+ <td align="center" valign="middle">
113
+ <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
114
+ </td>
115
+ <td align="center" valign="middle">
116
+ <a href="https://nanabit.dev/" target="_blank"><img src="https://images.opencollective.com/nanabit/d15fd98/logo/256.png?height=80" width="80"></a>
117
+ </td>
118
+ </tr>
119
+ </tbody>
120
+ </table>
121
+
122
+ [biomejs]: https://biomejs.dev/pt-br/
123
+ [biome-philosophy]: https://biomejs.dev/pt-br/internals/philosophy/
124
+ [language-support]: https://biomejs.dev/pt-br/internals/language-support/
125
+ [getting-started]: https://biomejs.dev/pt-br/guides/getting-started/
@@ -0,0 +1,117 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-dark-transparent.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg">
5
+ <img alt="Biome - Toolchain of the web" src="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg" width="700">
6
+ </picture>
7
+ </p>
8
+
9
+ <div align="center">
10
+
11
+ [![Discord chat][discord-badge]][discord-url]
12
+ [![CI on main][ci-badge]][ci-url]
13
+ [![npm version][npm-badge]][npm-url]
14
+ [![VSCode version][vscode-badge]][vscode-url]
15
+ [![Open VSX version][open-vsx-badge]][open-vsx-url]
16
+
17
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
18
+ [discord-url]: https://discord.gg/BypW39g6Yc
19
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
20
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
21
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
22
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
23
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
24
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
25
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
26
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
27
+
28
+ </div>
29
+
30
+ <div align="center">
31
+
32
+ [English](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.md) | 简体中文 | [日本語](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.ja.md) | [Português do Brasil](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.pt-br.md)
33
+
34
+ </div>
35
+
36
+ **Biome** 是一个用于 Web 项目的高性能工具链,旨在为开发者提供维护项目的工具。
37
+
38
+ **Biome 是一个[快速的格式化工具](./benchmark#formatting)**,适用于 _JavaScript_、_TypeScript_、_JSX_、_JSON_ 等,与 _Prettier_ 的兼容性达到了 **[97%](https://console.algora.io/challenges/prettier)**。
39
+
40
+ **Biome 是一个[高性能的 Linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)**,适用于 _JavaScript_、_TypeScript_、_JSX_ 等,包含了来自 ESLint、TypeScript ESLint 和[其他来源](https://github.com/biomejs/biome/discussions/3)的 **[190 余项规则](https://biomejs.dev/zh-cn/linter/rules/)**。它**输出详细且有上下文诊断信息**,能帮助你优化代码,成为一名更好的程序员!
41
+
42
+ **Biome** 从一开始就设计为[在编辑器中交互式使用](https://biomejs.dev/zh-cn/guides/integrate-in-editor/)。它可以在你编写代码时格式化并检查出不规范的代码。
43
+
44
+ ### 安装
45
+
46
+ ```shell
47
+ npm install --save-dev --save-exact @biomejs/biome
48
+ ```
49
+
50
+ ### 使用
51
+
52
+ ```shell
53
+ # 格式化文件
54
+ npx @biomejs/biome format --write ./src
55
+
56
+ # Lint 文件
57
+ npx @biomejs/biome lint ./src
58
+
59
+ # 运行格式化,Lint 等,并应用安全的建议
60
+ npx @biomejs/biome check --apply ./src
61
+
62
+ # 在 CI 环境中检查所有文件是否符合格式,Lint 等
63
+ npx @biomejs/biome ci ./src
64
+ ```
65
+
66
+ 如果你想在不安装的情况下试用 Biome,可以使用[在线 playground](https://biomejs.dev/playground/),它被编译为 WebAssembly。
67
+
68
+ ## 文档
69
+
70
+ 查看我们的[主页][biomejs]以了解更多关于 Biome 的信息,或者直接前往[入门指南][getting-started]开始使用 Biome。
71
+
72
+ ## 更多信息
73
+
74
+ **Biome** 有合理的默认设置,不需要配置。
75
+
76
+ **Biome** 旨在支持[所有主要的现代网络开发语言][language-support]。
77
+
78
+ **Biome** [不需要 Node.js](https://biomejs.dev/zh-cn/guides/manual-installation/) 就可以运行。
79
+
80
+ **Biome** 有一流的 LSP 支持,具有精密的解析器,可以完全保真地表示源文本,并具有顶级的错误恢复能力。
81
+
82
+ **Biome** 统一了以前分散的功能。基于共享的基础,我们可以提供一个处理代码、显示错误、并行工作、缓存和配置的一致体验。
83
+
84
+ 阅读更多关于我们的[项目理念][biome-philosophy]。
85
+
86
+ **Biome** 采用 [MIT 许可](https://github.com/biomejs/biome/tree/main/LICENSE-MIT) 或 [Apache 2.0 许可](https://github.com/biomejs/biome/tree/main/LICENSE-APACHE),并在 [贡献者公约行为准则](https://github.com/biomejs/biome/tree/main/CODE_OF_CONDUCT.md) 下进行管理。
87
+
88
+ ## 赞助商
89
+
90
+ ### 金牌赞助商
91
+
92
+ <table>
93
+ <tbody>
94
+ <tr>
95
+ <td align="center" valign="middle">
96
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
97
+ </td>
98
+ </tr>
99
+ </tbody>
100
+ </table>
101
+
102
+ ### 铜牌赞助商
103
+
104
+ <table>
105
+ <tbody>
106
+ <tr>
107
+ <td align="center" valign="middle">
108
+ <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
109
+ </td>
110
+ </tr>
111
+ </tbody>
112
+ </table>
113
+
114
+ [biomejs]: https://biomejs.dev/zh-cn/
115
+ [biome-philosophy]: https://biomejs.dev/zh-cn/internals/philosophy/
116
+ [language-support]: https://biomejs.dev/zh-cn/internals/language-support/
117
+ [getting-started]: https://biomejs.dev/zh-cn/guides/getting-started/
package/bin/biome CHANGED
@@ -1,5 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  const { platform, arch, env, version, release } = process;
3
+ const { execSync } = require("child_process");
4
+
5
+ function isMusl() {
6
+ let stderr;
7
+ try {
8
+ stderr = execSync("ldd --version", {
9
+ stdio: ['pipe', 'pipe', 'pipe']
10
+ });
11
+ } catch (err) {
12
+ stderr = err.stderr;
13
+ }
14
+ if (stderr.indexOf("musl") > -1) {
15
+ return true;
16
+ }
17
+ return false;
18
+ }
3
19
 
4
20
  const PLATFORMS = {
5
21
  win32: {
@@ -14,12 +30,21 @@ const PLATFORMS = {
14
30
  x64: "@biomejs/cli-linux-x64/biome",
15
31
  arm64: "@biomejs/cli-linux-arm64/biome",
16
32
  },
33
+ "linux-musl": {
34
+ x64: "@biomejs/cli-linux-x64-musl/biome",
35
+ arm64: "@biomejs/cli-linux-arm64-musl/biome",
36
+ },
17
37
  };
18
38
  if (env.ROME_BINARY) {
19
39
  console.warn(`[WARN] The environment variable "ROME_BINARY" is deprecated. Use "BIOME_BINARY" instead.`)
20
40
  }
21
41
 
22
- const binPath = env.BIOME_BINARY || env.ROME_BINARY || PLATFORMS?.[platform]?.[arch];
42
+ const binPath = env.BIOME_BINARY || env.ROME_BINARY ||
43
+ (platform === "linux" && isMusl()
44
+ ? PLATFORMS?.["linux-musl"]?.[arch]
45
+ : PLATFORMS?.[platform]?.[arch]
46
+ );
47
+
23
48
  if (binPath) {
24
49
  const packageManager = detectPackageManager();
25
50
  const result = require("child_process").spawnSync(
@@ -8,6 +8,13 @@
8
8
  "description": "A field for the [JSON schema](https://json-schema.org/) specification",
9
9
  "type": ["string", "null"]
10
10
  },
11
+ "css": {
12
+ "description": "Specific configuration for the Css language",
13
+ "anyOf": [
14
+ { "$ref": "#/definitions/CssConfiguration" },
15
+ { "type": "null" }
16
+ ]
17
+ },
11
18
  "extends": {
12
19
  "description": "A list of paths to other JSON files, used to extends the current configuration.",
13
20
  "anyOf": [{ "$ref": "#/definitions/StringSet" }, { "type": "null" }]
@@ -80,6 +87,13 @@
80
87
  { "type": "null" }
81
88
  ]
82
89
  },
90
+ "noAriaHiddenOnFocusable": {
91
+ "description": "Enforce that aria-hidden=\"true\" is not set on focusable elements.",
92
+ "anyOf": [
93
+ { "$ref": "#/definitions/RuleConfiguration" },
94
+ { "type": "null" }
95
+ ]
96
+ },
83
97
  "noAriaUnsupportedElements": {
84
98
  "description": "Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.",
85
99
  "anyOf": [
@@ -259,6 +273,13 @@
259
273
  { "type": "null" }
260
274
  ]
261
275
  },
276
+ "useValidAriaRole": {
277
+ "description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.",
278
+ "anyOf": [
279
+ { "$ref": "#/definitions/RuleConfiguration" },
280
+ { "type": "null" }
281
+ ]
282
+ },
262
283
  "useValidAriaValues": {
263
284
  "description": "Enforce that ARIA state and property values are valid.",
264
285
  "anyOf": [
@@ -442,6 +463,13 @@
442
463
  { "type": "null" }
443
464
  ]
444
465
  },
466
+ "useRegexLiterals": {
467
+ "description": "Enforce the use of the regular expression literals instead of the RegExp constructor if possible.",
468
+ "anyOf": [
469
+ { "$ref": "#/definitions/RuleConfiguration" },
470
+ { "type": "null" }
471
+ ]
472
+ },
445
473
  "useSimpleNumberKeys": {
446
474
  "description": "Disallow number literal object member names which are not base10 or uses underscore as separator",
447
475
  "anyOf": [
@@ -717,6 +745,80 @@
717
745
  }
718
746
  }
719
747
  },
748
+ "CssConfiguration": {
749
+ "description": "Options applied to CSS files",
750
+ "type": "object",
751
+ "properties": {
752
+ "formatter": {
753
+ "description": "Formatting options",
754
+ "anyOf": [
755
+ { "$ref": "#/definitions/CssFormatter" },
756
+ { "type": "null" }
757
+ ]
758
+ },
759
+ "parser": {
760
+ "description": "Parsing options",
761
+ "anyOf": [{ "$ref": "#/definitions/CssParser" }, { "type": "null" }]
762
+ }
763
+ },
764
+ "additionalProperties": false
765
+ },
766
+ "CssFormatter": {
767
+ "type": "object",
768
+ "properties": {
769
+ "enabled": {
770
+ "description": "Control the formatter for CSS (and its super languages) files.",
771
+ "type": ["boolean", "null"]
772
+ },
773
+ "indentSize": {
774
+ "description": "The size of the indentation applied to CSS (and its super languages) files. Default to 2.",
775
+ "type": ["integer", "null"],
776
+ "format": "uint8",
777
+ "minimum": 0.0
778
+ },
779
+ "indentStyle": {
780
+ "description": "The indent style applied to CSS (and its super languages) files.",
781
+ "anyOf": [
782
+ { "$ref": "#/definitions/PlainIndentStyle" },
783
+ { "type": "null" }
784
+ ]
785
+ },
786
+ "indentWidth": {
787
+ "description": "The size of the indentation applied to CSS (and its super languages) files. Default to 2.",
788
+ "type": ["integer", "null"],
789
+ "format": "uint8",
790
+ "minimum": 0.0
791
+ },
792
+ "lineEnding": {
793
+ "description": "The type of line ending applied to CSS (and its super languages) files.",
794
+ "anyOf": [{ "$ref": "#/definitions/LineEnding" }, { "type": "null" }]
795
+ },
796
+ "lineWidth": {
797
+ "description": "What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.",
798
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
799
+ },
800
+ "quoteStyle": {
801
+ "anyOf": [{ "$ref": "#/definitions/QuoteStyle" }, { "type": "null" }]
802
+ }
803
+ },
804
+ "additionalProperties": false
805
+ },
806
+ "CssParser": {
807
+ "description": "Options that changes how the CSS parser behaves",
808
+ "type": "object",
809
+ "properties": {
810
+ "allowWrongLineComments": {
811
+ "description": "Allow comments to appear on incorrect lines in `.css` files",
812
+ "type": ["boolean", "null"]
813
+ }
814
+ },
815
+ "additionalProperties": false
816
+ },
817
+ "DeprecatedHooksOptions": {
818
+ "description": "Options for the `useHookAtTopLevel` rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook.",
819
+ "type": "object",
820
+ "additionalProperties": false
821
+ },
720
822
  "EnumMemberCase": {
721
823
  "description": "Supported cases for TypeScript `enum` member names.",
722
824
  "oneOf": [
@@ -733,6 +835,52 @@
733
835
  { "description": "camelCase", "type": "string", "enum": ["camelCase"] }
734
836
  ]
735
837
  },
838
+ "FilenameCase": {
839
+ "description": "Supported cases for TypeScript `enum` member names.",
840
+ "oneOf": [
841
+ { "description": "camelCase", "type": "string", "enum": ["camelCase"] },
842
+ {
843
+ "description": "Match an export name",
844
+ "type": "string",
845
+ "enum": ["export"]
846
+ },
847
+ {
848
+ "description": "kebab-case",
849
+ "type": "string",
850
+ "enum": ["kebab-case"]
851
+ },
852
+ {
853
+ "description": "PascalCase",
854
+ "type": "string",
855
+ "enum": ["PascalCase"]
856
+ },
857
+ {
858
+ "description": "snake_case",
859
+ "type": "string",
860
+ "enum": ["snake_case"]
861
+ }
862
+ ]
863
+ },
864
+ "FilenameCases": {
865
+ "type": "array",
866
+ "items": { "$ref": "#/definitions/FilenameCase" },
867
+ "uniqueItems": true
868
+ },
869
+ "FilenamingConventionOptions": {
870
+ "description": "Rule's options.",
871
+ "type": "object",
872
+ "properties": {
873
+ "filenameCases": {
874
+ "description": "Allowed cases for _TypeScript_ `enum` member names.",
875
+ "allOf": [{ "$ref": "#/definitions/FilenameCases" }]
876
+ },
877
+ "strictCase": {
878
+ "description": "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].",
879
+ "type": "boolean"
880
+ }
881
+ },
882
+ "additionalProperties": false
883
+ },
736
884
  "FilesConfiguration": {
737
885
  "description": "The configuration of the filesystem",
738
886
  "type": "object",
@@ -833,7 +981,7 @@
833
981
  "additionalProperties": false
834
982
  },
835
983
  "HooksOptions": {
836
- "description": "Options for the rule `useExhaustiveDependencies` and `useHookAtTopLevel`",
984
+ "description": "Options for the rule `useExhaustiveDependencies`",
837
985
  "type": "object",
838
986
  "required": ["hooks"],
839
987
  "properties": {
@@ -1112,36 +1260,64 @@
1112
1260
  "description": "It enables ALL rules for this group.",
1113
1261
  "type": ["boolean", "null"]
1114
1262
  },
1115
- "noAriaHiddenOnFocusable": {
1116
- "description": "Enforce that aria-hidden=\"true\" is not set on focusable elements.",
1263
+ "noDuplicateJsonKeys": {
1264
+ "description": "Disallow two keys with the same name inside a JSON object.",
1117
1265
  "anyOf": [
1118
1266
  { "$ref": "#/definitions/RuleConfiguration" },
1119
1267
  { "type": "null" }
1120
1268
  ]
1121
1269
  },
1122
- "noDefaultExport": {
1123
- "description": "Disallow default exports.",
1270
+ "noEmptyBlockStatements": {
1271
+ "description": "Disallow empty block statements and static blocks.",
1124
1272
  "anyOf": [
1125
1273
  { "$ref": "#/definitions/RuleConfiguration" },
1126
1274
  { "type": "null" }
1127
1275
  ]
1128
1276
  },
1129
- "noDuplicateJsonKeys": {
1130
- "description": "Disallow two keys with the same name inside a JSON object.",
1277
+ "noEmptyTypeParameters": {
1278
+ "description": "Disallow empty type parameters in type aliases and interfaces.",
1131
1279
  "anyOf": [
1132
1280
  { "$ref": "#/definitions/RuleConfiguration" },
1133
1281
  { "type": "null" }
1134
1282
  ]
1135
1283
  },
1136
- "noEmptyBlockStatements": {
1137
- "description": "Disallow empty block statements and static blocks.",
1284
+ "noGlobalAssign": {
1285
+ "description": "Disallow assignments to native objects and read-only global variables.",
1138
1286
  "anyOf": [
1139
1287
  { "$ref": "#/definitions/RuleConfiguration" },
1140
1288
  { "type": "null" }
1141
1289
  ]
1142
1290
  },
1143
- "noImplicitAnyLet": {
1144
- "description": "Disallow use of implicit any type on variable declarations.",
1291
+ "noGlobalEval": {
1292
+ "description": "Disallow the use of global eval().",
1293
+ "anyOf": [
1294
+ { "$ref": "#/definitions/RuleConfiguration" },
1295
+ { "type": "null" }
1296
+ ]
1297
+ },
1298
+ "noInvalidUseBeforeDeclaration": {
1299
+ "description": "Disallow the use of variables and function parameters before their declaration",
1300
+ "anyOf": [
1301
+ { "$ref": "#/definitions/RuleConfiguration" },
1302
+ { "type": "null" }
1303
+ ]
1304
+ },
1305
+ "noMisleadingCharacterClass": {
1306
+ "description": "Disallow characters made with multiple code points in character class syntax.",
1307
+ "anyOf": [
1308
+ { "$ref": "#/definitions/RuleConfiguration" },
1309
+ { "type": "null" }
1310
+ ]
1311
+ },
1312
+ "noNodejsModules": {
1313
+ "description": "Forbid the use of Node.js builtin modules.",
1314
+ "anyOf": [
1315
+ { "$ref": "#/definitions/RuleConfiguration" },
1316
+ { "type": "null" }
1317
+ ]
1318
+ },
1319
+ "noThenProperty": {
1320
+ "description": "Disallow then property.",
1145
1321
  "anyOf": [
1146
1322
  { "$ref": "#/definitions/RuleConfiguration" },
1147
1323
  { "type": "null" }
@@ -1168,6 +1344,13 @@
1168
1344
  { "type": "null" }
1169
1345
  ]
1170
1346
  },
1347
+ "noUselessTernary": {
1348
+ "description": "Disallow ternary operators when simpler alternatives exist.",
1349
+ "anyOf": [
1350
+ { "$ref": "#/definitions/RuleConfiguration" },
1351
+ { "type": "null" }
1352
+ ]
1353
+ },
1171
1354
  "recommended": {
1172
1355
  "description": "It enables the recommended rules for this group",
1173
1356
  "type": ["boolean", "null"]
@@ -1179,6 +1362,27 @@
1179
1362
  { "type": "null" }
1180
1363
  ]
1181
1364
  },
1365
+ "useExportType": {
1366
+ "description": "Promotes the use of export type for types.",
1367
+ "anyOf": [
1368
+ { "$ref": "#/definitions/RuleConfiguration" },
1369
+ { "type": "null" }
1370
+ ]
1371
+ },
1372
+ "useFilenamingConvention": {
1373
+ "description": "Enforce naming conventions for JavaScript and TypeScript filenames.",
1374
+ "anyOf": [
1375
+ { "$ref": "#/definitions/RuleConfiguration" },
1376
+ { "type": "null" }
1377
+ ]
1378
+ },
1379
+ "useForOf": {
1380
+ "description": "This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.",
1381
+ "anyOf": [
1382
+ { "$ref": "#/definitions/RuleConfiguration" },
1383
+ { "type": "null" }
1384
+ ]
1385
+ },
1182
1386
  "useGroupedTypeImport": {
1183
1387
  "description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
1184
1388
  "anyOf": [
@@ -1193,15 +1397,29 @@
1193
1397
  { "type": "null" }
1194
1398
  ]
1195
1399
  },
1196
- "useRegexLiterals": {
1197
- "description": "Enforce the use of the regular expression literals instead of the RegExp constructor if possible.",
1400
+ "useImportType": {
1401
+ "description": "Promotes the use of import type for types.",
1198
1402
  "anyOf": [
1199
1403
  { "$ref": "#/definitions/RuleConfiguration" },
1200
1404
  { "type": "null" }
1201
1405
  ]
1202
1406
  },
1203
- "useValidAriaRole": {
1204
- "description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.",
1407
+ "useNodejsImportProtocol": {
1408
+ "description": "Enforces using the node: protocol for Node.js builtin modules.",
1409
+ "anyOf": [
1410
+ { "$ref": "#/definitions/RuleConfiguration" },
1411
+ { "type": "null" }
1412
+ ]
1413
+ },
1414
+ "useNumberNamespace": {
1415
+ "description": "Use the Number properties instead of global ones.",
1416
+ "anyOf": [
1417
+ { "$ref": "#/definitions/RuleConfiguration" },
1418
+ { "type": "null" }
1419
+ ]
1420
+ },
1421
+ "useShorthandFunctionType": {
1422
+ "description": "Enforce using function types instead of object type with call signatures.",
1205
1423
  "anyOf": [
1206
1424
  { "$ref": "#/definitions/RuleConfiguration" },
1207
1425
  { "type": "null" }
@@ -1295,6 +1513,13 @@
1295
1513
  "OverridePattern": {
1296
1514
  "type": "object",
1297
1515
  "properties": {
1516
+ "css": {
1517
+ "description": "Specific configuration for the Css language",
1518
+ "anyOf": [
1519
+ { "$ref": "#/definitions/CssConfiguration" },
1520
+ { "type": "null" }
1521
+ ]
1522
+ },
1298
1523
  "formatter": {
1299
1524
  "description": "Specific configuration for the Json language",
1300
1525
  "anyOf": [
@@ -1386,9 +1611,17 @@
1386
1611
  "allOf": [{ "$ref": "#/definitions/ComplexityOptions" }]
1387
1612
  },
1388
1613
  {
1389
- "description": "Options for `useExhaustiveDependencies` and `useHookAtTopLevel` rule",
1614
+ "description": "Options for `useFilenamingConvention` rule",
1615
+ "allOf": [{ "$ref": "#/definitions/FilenamingConventionOptions" }]
1616
+ },
1617
+ {
1618
+ "description": "Options for `useExhaustiveDependencies` rule",
1390
1619
  "allOf": [{ "$ref": "#/definitions/HooksOptions" }]
1391
1620
  },
1621
+ {
1622
+ "description": "Deprecated options for `useHookAtTopLevel` rule",
1623
+ "allOf": [{ "$ref": "#/definitions/DeprecatedHooksOptions" }]
1624
+ },
1392
1625
  {
1393
1626
  "description": "Options for `useNamingConvention` rule",
1394
1627
  "allOf": [{ "$ref": "#/definitions/NamingConventionOptions" }]
@@ -1535,6 +1768,13 @@
1535
1768
  { "type": "null" }
1536
1769
  ]
1537
1770
  },
1771
+ "noDefaultExport": {
1772
+ "description": "Disallow default exports.",
1773
+ "anyOf": [
1774
+ { "$ref": "#/definitions/RuleConfiguration" },
1775
+ { "type": "null" }
1776
+ ]
1777
+ },
1538
1778
  "noImplicitBoolean": {
1539
1779
  "description": "Disallow implicit true values on JSX boolean attributes",
1540
1780
  "anyOf": [
@@ -1644,6 +1884,13 @@
1644
1884
  { "type": "null" }
1645
1885
  ]
1646
1886
  },
1887
+ "useConsistentArrayType": {
1888
+ "description": "Require consistently using either T[] or Array<T>",
1889
+ "anyOf": [
1890
+ { "$ref": "#/definitions/RuleConfiguration" },
1891
+ { "type": "null" }
1892
+ ]
1893
+ },
1647
1894
  "useConst": {
1648
1895
  "description": "Require const declarations for variables that are never reassigned after declared.",
1649
1896
  "anyOf": [
@@ -1948,6 +2195,13 @@
1948
2195
  { "type": "null" }
1949
2196
  ]
1950
2197
  },
2198
+ "noImplicitAnyLet": {
2199
+ "description": "Disallow use of implicit any type on variable declarations.",
2200
+ "anyOf": [
2201
+ { "$ref": "#/definitions/RuleConfiguration" },
2202
+ { "type": "null" }
2203
+ ]
2204
+ },
1951
2205
  "noImportAssign": {
1952
2206
  "description": "Disallow assigning to imported bindings",
1953
2207
  "anyOf": [
@@ -2125,6 +2379,10 @@
2125
2379
  { "type": "null" }
2126
2380
  ]
2127
2381
  },
2382
+ "defaultBranch": {
2383
+ "description": "The main branch of the project",
2384
+ "type": ["string", "null"]
2385
+ },
2128
2386
  "enabled": {
2129
2387
  "description": "Whether Biome should integrate itself with the VCS client",
2130
2388
  "type": ["boolean", "null"]
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/biome","version":"1.4.1","bin":"bin/biome","scripts":{"postinstall":"node scripts/postinstall.js"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"packages/@biomejs/biome"},"author":"Emanuele Stoppa","license":"MIT OR Apache-2.0","bugs":"https://github.com/biomejs/biome/issues","description":"Biome is a toolchain for the web: formatter, linter and more","files":["bin/biome","scripts/postinstall.js","configuration_schema.json","README.md","LICENSE-APACHE","LICENSE-MIT","ROME-LICENSE-MIT"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.*"},"funding":{"type":"opencollective","url":"https://opencollective.com/biome"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.4.1","@biomejs/cli-win32-arm64":"1.4.1","@biomejs/cli-darwin-x64":"1.4.1","@biomejs/cli-darwin-arm64":"1.4.1","@biomejs/cli-linux-x64":"1.4.1","@biomejs/cli-linux-arm64":"1.4.1"}}
1
+ {"name":"@biomejs/biome","version":"1.5.0","bin":"bin/biome","scripts":{"postinstall":"node scripts/postinstall.js"},"homepage":"https://biomejs.dev","repository":{"type":"git","url":"https://github.com/biomejs/biome.git","directory":"packages/@biomejs/biome"},"author":"Emanuele Stoppa","license":"MIT OR Apache-2.0","bugs":"https://github.com/biomejs/biome/issues","description":"Biome is a toolchain for the web: formatter, linter and more","files":["bin/biome","scripts/postinstall.js","configuration_schema.json","README.md","LICENSE-APACHE","LICENSE-MIT","ROME-LICENSE-MIT"],"keywords":["JavaScript","TypeScript","format","lint","toolchain","JSON"],"engines":{"node":">=14.*"},"funding":{"type":"opencollective","url":"https://opencollective.com/biome"},"optionalDependencies":{"@biomejs/cli-win32-x64":"1.5.0","@biomejs/cli-win32-arm64":"1.5.0","@biomejs/cli-darwin-x64":"1.5.0","@biomejs/cli-darwin-arm64":"1.5.0","@biomejs/cli-linux-x64":"1.5.0","@biomejs/cli-linux-arm64":"1.5.0","@biomejs/cli-linux-x64-musl":"1.5.0","@biomejs/cli-linux-arm64-musl":"1.5.0"}}
@@ -1,4 +1,20 @@
1
1
  const { platform, arch } = process;
2
+ const { execSync } = require("child_process");
3
+
4
+ function isMusl() {
5
+ let stderr;
6
+ try {
7
+ stderr = execSync("ldd --version", {
8
+ stdio: ['pipe', 'pipe', 'pipe']
9
+ });
10
+ } catch (err) {
11
+ stderr = err.stderr;
12
+ }
13
+ if (stderr.indexOf("musl") > -1) {
14
+ return true;
15
+ }
16
+ return false;
17
+ }
2
18
 
3
19
  const PLATFORMS = {
4
20
  win32: {
@@ -13,9 +29,17 @@ const PLATFORMS = {
13
29
  x64: "@biomejs/cli-linux-x64/biome",
14
30
  arm64: "@biomejs/cli-linux-arm64/biome",
15
31
  },
32
+ "linux-musl": {
33
+ x64: "@biomejs/cli-linux-x64-musl/biome",
34
+ arm64: "@biomejs/cli-linux-arm64-musl/biome",
35
+ },
16
36
  };
17
37
 
18
- const binName = PLATFORMS?.[platform]?.[arch];
38
+ const binName =
39
+ platform === "linux" && isMusl()
40
+ ? PLATFORMS?.["linux-musl"]?.[arch]
41
+ : PLATFORMS?.[platform]?.[arch];
42
+
19
43
  if (binName) {
20
44
  let binPath;
21
45
  try {