@biomejs/biome 1.4.0 → 1.4.1-nightly.bc772a3
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/README.md +6 -0
- package/README.zh-CN.md +120 -0
- package/ROME-LICENSE-MIT +21 -0
- package/configuration_schema.json +21 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
[open-vsx-url]: https://open-vsx.org/extension/biomejs/biome
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
English | [简体中文](https://github.com/biomejs/biome/blob/main/packages/%40biomejs/biome/README.zh-CN.md)
|
|
32
|
+
|
|
27
33
|
</div>
|
|
28
34
|
|
|
29
35
|
**Biome** is a performant toolchain for web projects, it aims to provide developer tools to maintain the health of said projects.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div align="center">
|
|
30
|
+
|
|
31
|
+
[English](./README.md) | 简体中文
|
|
32
|
+
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
**Biome** 是一个用于网络项目的高性能工具链,旨在为开发者提供维护这些项目的工具。
|
|
36
|
+
|
|
37
|
+
**Biome 是一个[快速的格式化器](./benchmark#formatting)**,适用于 _JavaScript_、_TypeScript_、_JSX_ 和 _JSON_,与 _Prettier_ 的兼容性达到了 **[96%](https://console.algora.io/challenges/prettier)**。
|
|
38
|
+
|
|
39
|
+
**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/)**。
|
|
40
|
+
它**输出详细且有上下文的诊断信息**,帮助你改进代码,成为一个更好的程序员!
|
|
41
|
+
|
|
42
|
+
**Biome** 从一开始就设计为[在编辑器中交互式使用](https://biomejs.dev/zh-cn/guides/integrate-in-editor/)。
|
|
43
|
+
你在编写代码时,它可以格式化和 lint 不规范的代码。
|
|
44
|
+
|
|
45
|
+
### 安装
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
npm install --save-dev --save-exact @biomejs/biome
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 使用
|
|
52
|
+
|
|
53
|
+
```shell
|
|
54
|
+
# 格式化文件
|
|
55
|
+
npx @biomejs/biome format --write ./src
|
|
56
|
+
|
|
57
|
+
# lint 文件
|
|
58
|
+
npx @biomejs/biome lint ./src
|
|
59
|
+
|
|
60
|
+
# 运行格式化,lint 等,并应用安全的建议
|
|
61
|
+
npx @biomejs/biome check --apply ./src
|
|
62
|
+
|
|
63
|
+
# 在 CI 环境中检查所有文件是否符合格式,lint 等
|
|
64
|
+
npx @biomejs/biome ci ./src
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
如果你想在不安装的情况下试用 Biome,可以使用[在线 playground](https://biomejs.dev/playground/),它被编译为 WebAssembly。
|
|
68
|
+
|
|
69
|
+
## 文档
|
|
70
|
+
|
|
71
|
+
查看我们的[主页][biomejs]以了解更多关于 Biome 的信息,
|
|
72
|
+
或者直接前往[入门指南][getting-started]开始使用 Biome。
|
|
73
|
+
|
|
74
|
+
## 更多关于 Biome
|
|
75
|
+
|
|
76
|
+
**Biome** 有合理的默认设置,不需要配置。
|
|
77
|
+
|
|
78
|
+
**Biome** 旨在支持[所有主要的现代网络开发语言][language-support]。
|
|
79
|
+
|
|
80
|
+
**Biome** [不需要 Node.js](https://biomejs.dev/zh-cn/guides/manual-installation/)就可以运行。
|
|
81
|
+
|
|
82
|
+
**Biome** 有一流的 LSP 支持,具有精密的解析器,可以完全保真地表示源文本,并具有顶级的错误恢复能力。
|
|
83
|
+
|
|
84
|
+
**Biome** 统一了以前分散的功能。基于共享的基础,我们可以提供一个处理代码、显示错误、并行工作、缓存和配置的一致体验。
|
|
85
|
+
|
|
86
|
+
阅读更多关于我们的[项目理念][biome-philosophy]。
|
|
87
|
+
|
|
88
|
+
**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) 下进行管理。
|
|
89
|
+
|
|
90
|
+
## 赞助商
|
|
91
|
+
|
|
92
|
+
### 金牌赞助商
|
|
93
|
+
|
|
94
|
+
<table>
|
|
95
|
+
<tbody>
|
|
96
|
+
<tr>
|
|
97
|
+
<td align="center" valign="middle">
|
|
98
|
+
<a href="https://shiguredo.jp/" target="_blank"><img src="https://shiguredo.jp/official_shiguredo_logo.svg" height="120"></a>
|
|
99
|
+
</td>
|
|
100
|
+
</tr>
|
|
101
|
+
</tbody>
|
|
102
|
+
</table>
|
|
103
|
+
|
|
104
|
+
### 铜牌赞助商
|
|
105
|
+
|
|
106
|
+
<table>
|
|
107
|
+
<tbody>
|
|
108
|
+
<tr>
|
|
109
|
+
<td align="center" valign="middle">
|
|
110
|
+
<a href="https://www.kanamekey.com" target="_blank"><img src="https://images.opencollective.com/kaname/d15fd98/logo/256.png?height=80" width="80"></a>
|
|
111
|
+
</td>
|
|
112
|
+
</tr>
|
|
113
|
+
</tbody>
|
|
114
|
+
</table>
|
|
115
|
+
|
|
116
|
+
[bench]: https://github.com/biomejs/biome/blob/main/benchmark/README.md
|
|
117
|
+
[biomejs]: https://biomejs.dev/zh-cn/
|
|
118
|
+
[biome-philosophy]: https://biomejs.dev/zh-cn/internals/philosophy/
|
|
119
|
+
[language-support]: https://biomejs.dev/zh-cn/internals/language-support/
|
|
120
|
+
[getting-started]: https://biomejs.dev/zh-cn/guides/getting-started/
|
package/ROME-LICENSE-MIT
ADDED
|
@@ -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.
|
|
@@ -1147,6 +1147,13 @@
|
|
|
1147
1147
|
{ "type": "null" }
|
|
1148
1148
|
]
|
|
1149
1149
|
},
|
|
1150
|
+
"noMisleadingCharacterClass": {
|
|
1151
|
+
"description": "Disallow characters made with multiple code points in character class syntax.",
|
|
1152
|
+
"anyOf": [
|
|
1153
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1154
|
+
{ "type": "null" }
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1150
1157
|
"noUnusedImports": {
|
|
1151
1158
|
"description": "Disallow unused imports.",
|
|
1152
1159
|
"anyOf": [
|
|
@@ -1179,6 +1186,13 @@
|
|
|
1179
1186
|
{ "type": "null" }
|
|
1180
1187
|
]
|
|
1181
1188
|
},
|
|
1189
|
+
"useForOf": {
|
|
1190
|
+
"description": "This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array.",
|
|
1191
|
+
"anyOf": [
|
|
1192
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1193
|
+
{ "type": "null" }
|
|
1194
|
+
]
|
|
1195
|
+
},
|
|
1182
1196
|
"useGroupedTypeImport": {
|
|
1183
1197
|
"description": "Enforce the use of import type when an import only has specifiers with type qualifier.",
|
|
1184
1198
|
"anyOf": [
|
|
@@ -1200,6 +1214,13 @@
|
|
|
1200
1214
|
{ "type": "null" }
|
|
1201
1215
|
]
|
|
1202
1216
|
},
|
|
1217
|
+
"useShorthandFunctionType": {
|
|
1218
|
+
"description": "Enforce using function types instead of object type with call signatures.",
|
|
1219
|
+
"anyOf": [
|
|
1220
|
+
{ "$ref": "#/definitions/RuleConfiguration" },
|
|
1221
|
+
{ "type": "null" }
|
|
1222
|
+
]
|
|
1223
|
+
},
|
|
1203
1224
|
"useValidAriaRole": {
|
|
1204
1225
|
"description": "Elements with ARIA roles must use a valid, non-abstract ARIA role.",
|
|
1205
1226
|
"anyOf": [
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@biomejs/biome","version":"1.4.
|
|
1
|
+
{"name":"@biomejs/biome","version":"1.4.1-nightly.bc772a3","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.bc772a3","@biomejs/cli-win32-arm64":"1.4.1-nightly.bc772a3","@biomejs/cli-darwin-x64":"1.4.1-nightly.bc772a3","@biomejs/cli-darwin-arm64":"1.4.1-nightly.bc772a3","@biomejs/cli-linux-x64":"1.4.1-nightly.bc772a3","@biomejs/cli-linux-arm64":"1.4.1-nightly.bc772a3"}}
|