@biomejs/biome 1.4.0 → 1.4.1-nightly.22dd4e1

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,119 @@
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">
5
+ </p>
6
+
7
+ <div align="center">
8
+
9
+ [![Discord chat][discord-badge]][discord-url]
10
+ [![CI on main][ci-badge]][ci-url]
11
+ [![npm version][npm-badge]][npm-url]
12
+ [![VSCode version][vscode-badge]][vscode-url]
13
+ [![Open VSX version][open-vsx-badge]][open-vsx-url]
14
+
15
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
16
+ [discord-url]: https://discord.gg/BypW39g6Yc
17
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
18
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
19
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
20
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
21
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
22
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
23
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
24
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
25
+
26
+ </div>
27
+
28
+ <div align="center">
29
+
30
+ [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)
31
+
32
+ </div>
33
+
34
+ **Biome** はWebプロジェクトのための高性能なツールチェーンであり、プロジェクトの健全性を維持するための開発者ツールの提供を目的としています。
35
+
36
+ **Biome は _JavaScript_, _TypeScript_, _JSX_ そして _JSON_ 向けの[高速なFormatter](./benchmark#formatting)**であり、**[_Prettier_ との互換性は97%](https://console.algora.io/challenges/prettier)** を達成しています。
37
+
38
+ **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 は**詳細で文脈に沿った結果を出力**するため、コードを改善し、より良いプログラマになるための手助けをします!
39
+
40
+ **Biome** は最初から[**エディタ内で対話的に**](https://biomejs.dev/ja/guides/integrate-in-editor/)使用できるように設計されています。
41
+ あなたがコードを書いているときに、形の崩れたコードを format と lint することができます。
42
+
43
+ ### インストール
44
+
45
+ ```shell
46
+ npm install --save-dev --save-exact @biomejs/biome
47
+ ```
48
+
49
+ ### 使い方
50
+
51
+ ```shell
52
+ # ファイルをformatする
53
+ npx @biomejs/biome format --write ./src
54
+
55
+ # ファイルをlintする
56
+ npx @biomejs/biome lint ./src
57
+
58
+ # format、lintなどを実行し、安全な提案を適用する
59
+ npx @biomejs/biome check --apply ./src
60
+
61
+ # CI環境では、すべてのファイルを対象にformatやlintをチェックする
62
+ npx @biomejs/biome ci ./src
63
+ ```
64
+
65
+ Biome をインストールせずに試したい場合は、WebAssembly にコンパイルされた[オンラインのプレイグラウンド](https://biomejs.dev/playground/)を利用してください。
66
+
67
+ ## ドキュメント
68
+
69
+ Biome についてもっと知るために[ホームページ][biomejs]をチェックするか、Biome を使い始めるために[はじめる][getting-started]に進んでください。
70
+
71
+ ## Biome をもっと詳しく
72
+
73
+ **Biome** は理にかなったデフォルト設定を持ち、設定を必要としません。
74
+
75
+ **Biome** はモダンなウェブ開発における[全ての主要な言語][language-support]をサポートすることを目指しています。
76
+
77
+ **Biome** は動作するために Node.js を必要としません。
78
+
79
+ **Biome** はソーステキストの完全な表現力とエラー回復能力を持つ洗練されたParserによって、優れたLSPサポートを提供します。
80
+
81
+ **Biome** は以前は別々のツールで提供されていた機能を統合します。共通基盤を構築することで、コードの処理、エラーの表示、並列処理、キャッシュ、設定について統一的な体験を提供します。
82
+
83
+ 興味のある方は、[プロジェクトの理念][biome-philosophy]もご覧ください。
84
+
85
+ **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)の下で管理されています。
86
+
87
+ ## スポンサー
88
+
89
+ ### ゴールドスポンサー
90
+
91
+ <table>
92
+ <tbody>
93
+ <tr>
94
+ <td align="center" valign="middle">
95
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
96
+ </td>
97
+ </tr>
98
+ </tbody>
99
+ </table>
100
+
101
+ ### ブロンズスポンサー
102
+
103
+ <table>
104
+ <tbody>
105
+ <tr>
106
+ <td align="center" valign="middle">
107
+ <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
108
+ </td>
109
+ <td align="center" valign="middle">
110
+ <a href="https://nanabit.dev/" target="_blank"><img src="https://images.opencollective.com/nanabit/d15fd98/logo/256.png?height=80" width="80"></a>
111
+ </td>
112
+ </tr>
113
+ </tbody>
114
+ </table>
115
+
116
+ [biomejs]: https://biomejs.dev/ja/
117
+ [biome-philosophy]: https://biomejs.dev/ja/internals/philosophy/
118
+ [language-support]: https://biomejs.dev/ja/internals/language-support/
119
+ [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 170 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,123 @@
1
+ <p align="center">
2
+ <img alt="Biome - Conjunto de ferramentas da web"
3
+ src="https://raw.githubusercontent.com/biomejs/resources/main/biome-logo-slogan.svg"
4
+ width="400">
5
+ </p>
6
+
7
+ <div align="center">
8
+
9
+ [![Chat no Discord][discord-badge]][discord-url]
10
+ [![CI na `main`][ci-badge]][ci-url]
11
+ [![versão npm][npm-badge]][npm-url]
12
+ [![versão VSCode][vscode-badge]][vscode-url]
13
+ [![versão Open VSX][open-vsx-badge]][open-vsx-url]
14
+
15
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
16
+ [discord-url]: https://discord.gg/BypW39g6Yc
17
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
18
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
19
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
20
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
21
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
22
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
23
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
24
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
25
+
26
+ </div>
27
+
28
+ <div align="center">
29
+
30
+ [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
31
+
32
+ </div>
33
+
34
+ **Biome** é um conjunto de ferramentas de alto desempenho para projetos web, visando fornecer recursos de desenvolvimento para manter a saúde desses projetos.
35
+
36
+ **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)**.
37
+
38
+ **Biome é um [linter eficiente](https://github.com/biomejs/biome/tree/main/benchmark#linting)** para _JavaScript_, _TypeScript_, e _JSX_ que possui **[mais de 170 regras](https://biomejs.dev/linter/rules/)** do ESLint, TypeScript ESLint, e de [outras fontes](https://github.com/biomejs/biome/discussions/3).
39
+ Ele **fornece diagnósticos detalhados e contextualizados** que ajudam você a melhorar seu código e se tornar um programador melhor!
40
+
41
+ **Biome** é projetado desde o início para ser usado [interativamente dentro de um editor](https://biomejs.dev/guides/integrate-in-editor/).
42
+ Isso permite formatar e lintar códigos malformados enquanto você programa.
43
+
44
+ ### Instalação
45
+
46
+ ```shell
47
+ npm install --save-dev --save-exact @biomejs/biome
48
+ ```
49
+
50
+ ### Uso
51
+
52
+ ```shell
53
+ # formatar arquivos
54
+ npx @biomejs/biome format --write ./src
55
+
56
+ # lintar arquivos
57
+ npx @biomejs/biome lint ./src
58
+
59
+ # executar formatação, lint, etc. e aplicar as sugestões seguras
60
+ npx @biomejs/biome check --apply ./src
61
+
62
+ # verificar todos os arquivos contra formatação, lint, etc. em ambientes CI
63
+ npx @biomejs/biome ci ./src
64
+ ```
65
+
66
+ Se você quiser experimentar o Biome sem instalá-lo, use o [playground online](https://biomejs.dev/playground/), compilado para WebAssembly.
67
+
68
+ ## Documentação
69
+
70
+ Confira nossa [página inicial][biomejs] para saber mais sobre o Biome,
71
+ ou vá ao [Guia de Introdução][getting-started] para começar a usar o Biome.
72
+
73
+ ## Mais sobre o Biome
74
+
75
+ **Biome** tem padrões robustos e não requer configuração.
76
+
77
+ **Biome** visa suportar [todas as principais linguagens][language-support] do desenvolvimento web moderno.
78
+
79
+ **Biome** [não requer Node.js](https://biomejs.dev/guides/manual-installation/) para funcionar.
80
+
81
+ **Biome** tem suporte de primeira linha para LSP, com um
82
+
83
+ parser sofisticado que representa o texto-fonte em sua total fidelidade e recuperação de erro de ponta.
84
+
85
+ **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.
86
+
87
+ Leia mais sobre nossa [filosofia de projeto][biome-philosophy].
88
+
89
+ **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).
90
+
91
+ ## Patrocinadores
92
+
93
+ ### Patrocinadores Ouro
94
+
95
+ <table>
96
+ <tbody>
97
+ <tr>
98
+ <td align="center" valign="middle">
99
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
100
+ </td>
101
+ </tr>
102
+ </tbody>
103
+ </table>
104
+
105
+ ### Patrocinadores Bronze
106
+
107
+ <table>
108
+ <tbody>
109
+ <tr>
110
+ <td align="center" valign="middle">
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>
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>
116
+ </tr>
117
+ </tbody>
118
+ </table>
119
+
120
+ [biomejs]: https://biomejs.dev/pt-br/
121
+ [biome-philosophy]: https://biomejs.dev/pt-br/internals/philosophy/
122
+ [language-support]: https://biomejs.dev/pt-br/internals/language-support/
123
+ [getting-started]: https://biomejs.dev/pt-br/guides/getting-started/
@@ -0,0 +1,115 @@
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">
5
+ </p>
6
+
7
+ <div align="center">
8
+
9
+ [![Discord chat][discord-badge]][discord-url]
10
+ [![CI on main][ci-badge]][ci-url]
11
+ [![npm version][npm-badge]][npm-url]
12
+ [![VSCode version][vscode-badge]][vscode-url]
13
+ [![Open VSX version][open-vsx-badge]][open-vsx-url]
14
+
15
+ [discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
16
+ [discord-url]: https://discord.gg/BypW39g6Yc
17
+ [ci-badge]: https://github.com/biomejs/biome/actions/workflows/main.yml/badge.svg
18
+ [ci-url]: https://github.com/biomejs/biome/actions/workflows/main.yml
19
+ [npm-badge]: https://badgen.net/npm/v/@biomejs/biome?icon=npm&color=green&label=%40biomejs%2Fbiome
20
+ [npm-url]: https://www.npmjs.com/package/@biomejs/biome/v/latest
21
+ [vscode-badge]: https://badgen.net/vs-marketplace/v/biomejs.biome?label=vscode&icon=visualstudio&color=green
22
+ [vscode-url]: https://marketplace.visualstudio.com/items?itemName=biomejs.biome
23
+ [open-vsx-badge]: https://badgen.net/open-vsx/version/biomejs/biome?label=open-vsx&color=green
24
+ [open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
25
+
26
+ </div>
27
+
28
+ <div align="center">
29
+
30
+ [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)
31
+
32
+ </div>
33
+
34
+ **Biome** 是一个用于 Web 项目的高性能工具链,旨在为开发者提供维护项目的工具。
35
+
36
+ **Biome 是一个[快速的格式化工具](./benchmark#formatting)**,适用于 _JavaScript_、_TypeScript_、_JSX_、_JSON_ 等,与 _Prettier_ 的兼容性达到了 **[97%](https://console.algora.io/challenges/prettier)**。
37
+
38
+ **Biome 是一个[高性能的 Linter](https://github.com/biomejs/biome/tree/main/benchmark#linting)**,适用于 _JavaScript_、_TypeScript_、_JSX_ 等,包含了来自 ESLint、TypeScript ESLint 和[其他来源](https://github.com/biomejs/biome/discussions/3)的 **[170 余项规则](https://biomejs.dev/zh-cn/linter/rules/)**。它**输出详细且有上下文诊断信息**,能帮助你优化代码,成为一名更好的程序员!
39
+
40
+ **Biome** 从一开始就设计为[在编辑器中交互式使用](https://biomejs.dev/zh-cn/guides/integrate-in-editor/)。它可以在你编写代码时格式化并检查出不规范的代码。
41
+
42
+ ### 安装
43
+
44
+ ```shell
45
+ npm install --save-dev --save-exact @biomejs/biome
46
+ ```
47
+
48
+ ### 使用
49
+
50
+ ```shell
51
+ # 格式化文件
52
+ npx @biomejs/biome format --write ./src
53
+
54
+ # Lint 文件
55
+ npx @biomejs/biome lint ./src
56
+
57
+ # 运行格式化,Lint 等,并应用安全的建议
58
+ npx @biomejs/biome check --apply ./src
59
+
60
+ # 在 CI 环境中检查所有文件是否符合格式,Lint 等
61
+ npx @biomejs/biome ci ./src
62
+ ```
63
+
64
+ 如果你想在不安装的情况下试用 Biome,可以使用[在线 playground](https://biomejs.dev/playground/),它被编译为 WebAssembly。
65
+
66
+ ## 文档
67
+
68
+ 查看我们的[主页][biomejs]以了解更多关于 Biome 的信息,或者直接前往[入门指南][getting-started]开始使用 Biome。
69
+
70
+ ## 更多信息
71
+
72
+ **Biome** 有合理的默认设置,不需要配置。
73
+
74
+ **Biome** 旨在支持[所有主要的现代网络开发语言][language-support]。
75
+
76
+ **Biome** [不需要 Node.js](https://biomejs.dev/zh-cn/guides/manual-installation/) 就可以运行。
77
+
78
+ **Biome** 有一流的 LSP 支持,具有精密的解析器,可以完全保真地表示源文本,并具有顶级的错误恢复能力。
79
+
80
+ **Biome** 统一了以前分散的功能。基于共享的基础,我们可以提供一个处理代码、显示错误、并行工作、缓存和配置的一致体验。
81
+
82
+ 阅读更多关于我们的[项目理念][biome-philosophy]。
83
+
84
+ **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) 下进行管理。
85
+
86
+ ## 赞助商
87
+
88
+ ### 金牌赞助商
89
+
90
+ <table>
91
+ <tbody>
92
+ <tr>
93
+ <td align="center" valign="middle">
94
+ <a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
95
+ </td>
96
+ </tr>
97
+ </tbody>
98
+ </table>
99
+
100
+ ### 铜牌赞助商
101
+
102
+ <table>
103
+ <tbody>
104
+ <tr>
105
+ <td align="center" valign="middle">
106
+ <a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
107
+ </td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+
112
+ [biomejs]: https://biomejs.dev/zh-cn/
113
+ [biome-philosophy]: https://biomejs.dev/zh-cn/internals/philosophy/
114
+ [language-support]: https://biomejs.dev/zh-cn/internals/language-support/
115
+ [getting-started]: https://biomejs.dev/zh-cn/guides/getting-started/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020-2023 Rome Tools is Rome Tools, Inc. and its affiliates.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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" }]
@@ -717,6 +724,72 @@
717
724
  }
718
725
  }
719
726
  },
727
+ "CssConfiguration": {
728
+ "description": "Options applied to CSS files",
729
+ "type": "object",
730
+ "properties": {
731
+ "formatter": {
732
+ "description": "Formatting options",
733
+ "anyOf": [
734
+ { "$ref": "#/definitions/CssFormatter" },
735
+ { "type": "null" }
736
+ ]
737
+ },
738
+ "parser": {
739
+ "description": "Parsing options",
740
+ "anyOf": [{ "$ref": "#/definitions/CssParser" }, { "type": "null" }]
741
+ }
742
+ },
743
+ "additionalProperties": false
744
+ },
745
+ "CssFormatter": {
746
+ "type": "object",
747
+ "properties": {
748
+ "enabled": {
749
+ "description": "Control the formatter for CSS (and its super languages) files.",
750
+ "type": ["boolean", "null"]
751
+ },
752
+ "indentSize": {
753
+ "description": "The size of the indentation applied to CSS (and its super languages) files. Default to 2.",
754
+ "type": ["integer", "null"],
755
+ "format": "uint8",
756
+ "minimum": 0.0
757
+ },
758
+ "indentStyle": {
759
+ "description": "The indent style applied to CSS (and its super languages) files.",
760
+ "anyOf": [
761
+ { "$ref": "#/definitions/PlainIndentStyle" },
762
+ { "type": "null" }
763
+ ]
764
+ },
765
+ "indentWidth": {
766
+ "description": "The size of the indentation applied to CSS (and its super languages) files. Default to 2.",
767
+ "type": ["integer", "null"],
768
+ "format": "uint8",
769
+ "minimum": 0.0
770
+ },
771
+ "lineEnding": {
772
+ "description": "The type of line ending applied to CSS (and its super languages) files.",
773
+ "anyOf": [{ "$ref": "#/definitions/LineEnding" }, { "type": "null" }]
774
+ },
775
+ "lineWidth": {
776
+ "description": "What's the max width of a line applied to CSS (and its super languages) files. Defaults to 80.",
777
+ "anyOf": [{ "$ref": "#/definitions/LineWidth" }, { "type": "null" }]
778
+ }
779
+ },
780
+ "additionalProperties": false
781
+ },
782
+ "CssParser": {
783
+ "description": "Options that changes how the CSS parser behaves",
784
+ "type": "object",
785
+ "properties": {
786
+ "allowWrongLineComments": {
787
+ "description": "Allow comments to appear on incorrect lines in `.css` files",
788
+ "type": ["boolean", "null"]
789
+ }
790
+ },
791
+ "additionalProperties": false
792
+ },
720
793
  "EnumMemberCase": {
721
794
  "description": "Supported cases for TypeScript `enum` member names.",
722
795
  "oneOf": [
@@ -733,6 +806,47 @@
733
806
  { "description": "camelCase", "type": "string", "enum": ["camelCase"] }
734
807
  ]
735
808
  },
809
+ "FilenameCase": {
810
+ "description": "Supported cases for TypeScript `enum` member names.",
811
+ "oneOf": [
812
+ { "description": "camelCase", "type": "string", "enum": ["camelCase"] },
813
+ {
814
+ "description": "Match an export name",
815
+ "type": "string",
816
+ "enum": ["export"]
817
+ },
818
+ {
819
+ "description": "kebab-case",
820
+ "type": "string",
821
+ "enum": ["kebab-case"]
822
+ },
823
+ {
824
+ "description": "PascalCase",
825
+ "type": "string",
826
+ "enum": ["snake_case"]
827
+ }
828
+ ]
829
+ },
830
+ "FilenameCases": {
831
+ "type": "array",
832
+ "items": { "$ref": "#/definitions/FilenameCase" },
833
+ "uniqueItems": true
834
+ },
835
+ "FilenamingConventionOptions": {
836
+ "description": "Rule's options.",
837
+ "type": "object",
838
+ "properties": {
839
+ "filenameCases": {
840
+ "description": "Allowed cases for _TypeScript_ `enum` member names.",
841
+ "allOf": [{ "$ref": "#/definitions/FilenameCases" }]
842
+ },
843
+ "strictCase": {
844
+ "description": "If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].",
845
+ "type": "boolean"
846
+ }
847
+ },
848
+ "additionalProperties": false
849
+ },
736
850
  "FilesConfiguration": {
737
851
  "description": "The configuration of the filesystem",
738
852
  "type": "object",
@@ -1147,6 +1261,27 @@
1147
1261
  { "type": "null" }
1148
1262
  ]
1149
1263
  },
1264
+ "noInvalidUseBeforeDeclaration": {
1265
+ "description": "Disallow the use of variables and function parameters before their declaration",
1266
+ "anyOf": [
1267
+ { "$ref": "#/definitions/RuleConfiguration" },
1268
+ { "type": "null" }
1269
+ ]
1270
+ },
1271
+ "noMisleadingCharacterClass": {
1272
+ "description": "Disallow characters made with multiple code points in character class syntax.",
1273
+ "anyOf": [
1274
+ { "$ref": "#/definitions/RuleConfiguration" },
1275
+ { "type": "null" }
1276
+ ]
1277
+ },
1278
+ "noNodejsModules": {
1279
+ "description": "Forbid the use of Node.js builtin modules. Can be useful for client-side web projects that do not have access to those modules.",
1280
+ "anyOf": [
1281
+ { "$ref": "#/definitions/RuleConfiguration" },
1282
+ { "type": "null" }
1283
+ ]
1284
+ },
1150
1285
  "noUnusedImports": {
1151
1286
  "description": "Disallow unused imports.",
1152
1287
  "anyOf": [
@@ -1168,6 +1303,13 @@
1168
1303
  { "type": "null" }
1169
1304
  ]
1170
1305
  },
1306
+ "noUselessTernary": {
1307
+ "description": "Disallow ternary operators when simpler alternatives exist.",
1308
+ "anyOf": [
1309
+ { "$ref": "#/definitions/RuleConfiguration" },
1310
+ { "type": "null" }
1311
+ ]
1312
+ },
1171
1313
  "recommended": {
1172
1314
  "description": "It enables the recommended rules for this group",
1173
1315
  "type": ["boolean", "null"]
@@ -1179,6 +1321,27 @@
1179
1321
  { "type": "null" }
1180
1322
  ]
1181
1323
  },
1324
+ "useExportType": {
1325
+ "description": "Promotes the use of export type for types.",
1326
+ "anyOf": [
1327
+ { "$ref": "#/definitions/RuleConfiguration" },
1328
+ { "type": "null" }
1329
+ ]
1330
+ },
1331
+ "useFilenamingConvention": {
1332
+ "description": "Enforce naming conventions for JavaScript and TypeScript filenames.",
1333
+ "anyOf": [
1334
+ { "$ref": "#/definitions/RuleConfiguration" },
1335
+ { "type": "null" }
1336
+ ]
1337
+ },
1338
+ "useForOf": {
1339
+ "description": "This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.",
1340
+ "anyOf": [
1341
+ { "$ref": "#/definitions/RuleConfiguration" },
1342
+ { "type": "null" }
1343
+ ]
1344
+ },
1182
1345
  "useGroupedTypeImport": {
1183
1346
  "description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
1184
1347
  "anyOf": [
@@ -1193,6 +1356,13 @@
1193
1356
  { "type": "null" }
1194
1357
  ]
1195
1358
  },
1359
+ "useNodeImportProtocol": {
1360
+ "description": "Enforces using the node: protocol for Node.js builtin modules.",
1361
+ "anyOf": [
1362
+ { "$ref": "#/definitions/RuleConfiguration" },
1363
+ { "type": "null" }
1364
+ ]
1365
+ },
1196
1366
  "useRegexLiterals": {
1197
1367
  "description": "Enforce the use of the regular expression literals instead of the RegExp constructor if possible.",
1198
1368
  "anyOf": [
@@ -1200,6 +1370,13 @@
1200
1370
  { "type": "null" }
1201
1371
  ]
1202
1372
  },
1373
+ "useShorthandFunctionType": {
1374
+ "description": "Enforce using function types instead of object type with call signatures.",
1375
+ "anyOf": [
1376
+ { "$ref": "#/definitions/RuleConfiguration" },
1377
+ { "type": "null" }
1378
+ ]
1379
+ },
1203
1380
  "useValidAriaRole": {
1204
1381
  "description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.",
1205
1382
  "anyOf": [
@@ -1295,6 +1472,13 @@
1295
1472
  "OverridePattern": {
1296
1473
  "type": "object",
1297
1474
  "properties": {
1475
+ "css": {
1476
+ "description": "Specific configuration for the Css language",
1477
+ "anyOf": [
1478
+ { "$ref": "#/definitions/CssConfiguration" },
1479
+ { "type": "null" }
1480
+ ]
1481
+ },
1298
1482
  "formatter": {
1299
1483
  "description": "Specific configuration for the Json language",
1300
1484
  "anyOf": [
@@ -1385,6 +1569,10 @@
1385
1569
  "description": "Options for `noExcessiveComplexity` rule",
1386
1570
  "allOf": [{ "$ref": "#/definitions/ComplexityOptions" }]
1387
1571
  },
1572
+ {
1573
+ "description": "Options for `useFilenamingConvention` rule",
1574
+ "allOf": [{ "$ref": "#/definitions/FilenamingConventionOptions" }]
1575
+ },
1388
1576
  {
1389
1577
  "description": "Options for `useExhaustiveDependencies` and `useHookAtTopLevel` rule",
1390
1578
  "allOf": [{ "$ref": "#/definitions/HooksOptions" }]
@@ -2125,6 +2313,10 @@
2125
2313
  { "type": "null" }
2126
2314
  ]
2127
2315
  },
2316
+ "defaultBranch": {
2317
+ "description": "The main branch of the project",
2318
+ "type": ["string", "null"]
2319
+ },
2128
2320
  "enabled": {
2129
2321
  "description": "Whether Biome should integrate itself with the VCS client",
2130
2322
  "type": ["boolean", "null"]
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@biomejs/biome","version":"1.4.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"],"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.0","@biomejs/cli-win32-arm64":"1.4.0","@biomejs/cli-darwin-x64":"1.4.0","@biomejs/cli-darwin-arm64":"1.4.0","@biomejs/cli-linux-x64":"1.4.0","@biomejs/cli-linux-arm64":"1.4.0"}}
1
+ {"name":"@biomejs/biome","version":"1.4.1-nightly.22dd4e1","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-nightly.22dd4e1","@biomejs/cli-win32-arm64":"1.4.1-nightly.22dd4e1","@biomejs/cli-darwin-x64":"1.4.1-nightly.22dd4e1","@biomejs/cli-darwin-arm64":"1.4.1-nightly.22dd4e1","@biomejs/cli-linux-x64":"1.4.1-nightly.22dd4e1","@biomejs/cli-linux-arm64":"1.4.1-nightly.22dd4e1","@biomejs/cli-linux-x64-musl":"1.4.1-nightly.22dd4e1","@biomejs/cli-linux-arm64-musl":"1.4.1-nightly.22dd4e1"}}
@@ -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 {