@yuu1111/biome-config 1.3.9 → 2.0.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/README.ja.md +7 -8
- package/README.md +7 -8
- package/package.json +1 -1
- package/plugins-core.json +7 -7
- package/plugins-discord.json +1 -10
- package/plugins-network.json +2 -9
- /package/plugins/{no-incomplete-implementation.grit → core/no-incomplete-implementation.grit} +0 -0
- /package/plugins/{no-meaningless-test.grit → core/no-meaningless-test.grit} +0 -0
- /package/plugins/{no-reexports.grit → core/no-reexports.grit} +0 -0
- /package/plugins/{no-ternary-statement.grit → core/no-ternary-statement.grit} +0 -0
- /package/plugins/{no-type-safety-bypass.grit → core/no-type-safety-bypass.grit} +0 -0
- /package/plugins/{no-unsafe-errno-assertion.grit → core/no-unsafe-errno-assertion.grit} +0 -0
- /package/plugins/{no-useless-abstraction.grit → core/no-useless-abstraction.grit} +0 -0
- /package/plugins/{no-unsafe-dynamic-discord-message.grit → discord/no-unsafe-dynamic-discord-message.grit} +0 -0
- /package/plugins/{require-abort-timeout-cleanup.grit → network/require-abort-timeout-cleanup.grit} +0 -0
- /package/plugins/{require-fetch-abort-signal.grit → network/require-fetch-abort-signal.grit} +0 -0
- /package/plugins/{no-adapter-import.grit → scoped/no-adapter-import.grit} +0 -0
- /package/plugins/{no-direct-response.grit → scoped/no-direct-response.grit} +0 -0
package/README.ja.md
CHANGED
|
@@ -40,25 +40,24 @@ CSS/Tailwind対応を含む
|
|
|
40
40
|
|
|
41
41
|
### Custom rule presets
|
|
42
42
|
|
|
43
|
-
Custom ruleはopt-in baseまたはReact
|
|
43
|
+
Custom ruleはopt-in baseまたはReact設定の後ろに、必要な層のpresetを並べる
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
46
|
{
|
|
47
47
|
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
|
48
48
|
"extends": [
|
|
49
49
|
"@yuu1111/biome-config/biome",
|
|
50
|
+
"@yuu1111/biome-config/plugins/core",
|
|
50
51
|
"@yuu1111/biome-config/plugins/network"
|
|
51
52
|
]
|
|
52
53
|
}
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
Projectに必要な最も具体的なpresetを選ぶ
|
|
56
|
-
|
|
57
56
|
- `plugins/core` はforwarding export、未完成実装、型安全の迂回、安全でないerrno assertion、無意味なtest、pass-through wrapper、副作用目的のternaryを検査する
|
|
58
|
-
- `plugins/network` は `
|
|
59
|
-
- `plugins/discord`
|
|
57
|
+
- `plugins/network` は `fetch` に `AbortSignal` を要求し、手動で予約したabort timeoutの後始末を検査する
|
|
58
|
+
- `plugins/discord` は動的なDiscord messageに明示的なmention処理があるかを検査する
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
presetは他の層を含まないため、Projectに必要な層をすべて並べる
|
|
62
61
|
|
|
63
62
|
#### Core rules
|
|
64
63
|
|
|
@@ -114,7 +113,7 @@ cacheRequest.catch(() => null)
|
|
|
114
113
|
{
|
|
115
114
|
"plugins": [
|
|
116
115
|
{
|
|
117
|
-
"path": "./node_modules/@yuu1111/biome-config/plugins/no-adapter-import.grit",
|
|
116
|
+
"path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
|
|
118
117
|
"includes": ["**/src/modules/authorization/**"]
|
|
119
118
|
}
|
|
120
119
|
]
|
|
@@ -140,7 +139,7 @@ pluginは `includes` に一致したfileだけで走るため、同じimportはa
|
|
|
140
139
|
{
|
|
141
140
|
"plugins": [
|
|
142
141
|
{
|
|
143
|
-
"path": "./node_modules/@yuu1111/biome-config/plugins/no-direct-response.grit",
|
|
142
|
+
"path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
|
|
144
143
|
"includes": ["**/src/worker/routes/**"]
|
|
145
144
|
}
|
|
146
145
|
]
|
package/README.md
CHANGED
|
@@ -40,25 +40,24 @@ CSS/Tailwind support included.
|
|
|
40
40
|
|
|
41
41
|
### Custom rule presets
|
|
42
42
|
|
|
43
|
-
Custom rules are opt-in.
|
|
43
|
+
Custom rules are opt-in. Each preset holds one layer of rules; add the layers the project needs after the base or React configuration:
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
46
|
{
|
|
47
47
|
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
|
48
48
|
"extends": [
|
|
49
49
|
"@yuu1111/biome-config/biome",
|
|
50
|
+
"@yuu1111/biome-config/plugins/core",
|
|
50
51
|
"@yuu1111/biome-config/plugins/network"
|
|
51
52
|
]
|
|
52
53
|
}
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
Choose the most specific preset needed by the project:
|
|
56
|
-
|
|
57
56
|
- `plugins/core` checks forwarding exports, incomplete implementations, type-safety bypasses, unsafe errno assertions, meaningless tests, pass-through wrappers, and ternaries used for side effects
|
|
58
|
-
- `plugins/network`
|
|
59
|
-
- `plugins/discord`
|
|
57
|
+
- `plugins/network` requires an `AbortSignal` for `fetch` and checks cleanup for manually scheduled abort timeouts
|
|
58
|
+
- `plugins/discord` checks dynamic Discord messages for explicit mention handling
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
A preset does not include the other layers, so list every layer the project needs.
|
|
62
61
|
|
|
63
62
|
#### Core rules
|
|
64
63
|
|
|
@@ -114,7 +113,7 @@ cacheRequest.catch(() => null)
|
|
|
114
113
|
{
|
|
115
114
|
"plugins": [
|
|
116
115
|
{
|
|
117
|
-
"path": "./node_modules/@yuu1111/biome-config/plugins/no-adapter-import.grit",
|
|
116
|
+
"path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
|
|
118
117
|
"includes": ["**/src/modules/authorization/**"]
|
|
119
118
|
}
|
|
120
119
|
]
|
|
@@ -140,7 +139,7 @@ Leave the layer that is allowed to reach the integration modules out of the patt
|
|
|
140
139
|
{
|
|
141
140
|
"plugins": [
|
|
142
141
|
{
|
|
143
|
-
"path": "./node_modules/@yuu1111/biome-config/plugins/no-direct-response.grit",
|
|
142
|
+
"path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
|
|
144
143
|
"includes": ["**/src/worker/routes/**"]
|
|
145
144
|
}
|
|
146
145
|
]
|
package/package.json
CHANGED
package/plugins-core.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
|
3
3
|
"plugins": [
|
|
4
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-reexports.grit",
|
|
5
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-incomplete-implementation.grit",
|
|
6
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-type-safety-bypass.grit",
|
|
7
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-unsafe-errno-assertion.grit",
|
|
8
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-meaningless-test.grit",
|
|
9
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-useless-abstraction.grit",
|
|
10
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-ternary-statement.grit"
|
|
4
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-reexports.grit",
|
|
5
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-incomplete-implementation.grit",
|
|
6
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-type-safety-bypass.grit",
|
|
7
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-unsafe-errno-assertion.grit",
|
|
8
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-meaningless-test.grit",
|
|
9
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-useless-abstraction.grit",
|
|
10
|
+
"./node_modules/@yuu1111/biome-config/plugins/core/no-ternary-statement.grit"
|
|
11
11
|
]
|
|
12
12
|
}
|
package/plugins-discord.json
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
|
3
3
|
"plugins": [
|
|
4
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-
|
|
5
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-incomplete-implementation.grit",
|
|
6
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-type-safety-bypass.grit",
|
|
7
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-unsafe-errno-assertion.grit",
|
|
8
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-meaningless-test.grit",
|
|
9
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-useless-abstraction.grit",
|
|
10
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-ternary-statement.grit",
|
|
11
|
-
"./node_modules/@yuu1111/biome-config/plugins/require-fetch-abort-signal.grit",
|
|
12
|
-
"./node_modules/@yuu1111/biome-config/plugins/require-abort-timeout-cleanup.grit",
|
|
13
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-unsafe-dynamic-discord-message.grit"
|
|
4
|
+
"./node_modules/@yuu1111/biome-config/plugins/discord/no-unsafe-dynamic-discord-message.grit"
|
|
14
5
|
]
|
|
15
6
|
}
|
package/plugins-network.json
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
|
3
3
|
"plugins": [
|
|
4
|
-
"./node_modules/@yuu1111/biome-config/plugins/
|
|
5
|
-
"./node_modules/@yuu1111/biome-config/plugins/
|
|
6
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-type-safety-bypass.grit",
|
|
7
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-unsafe-errno-assertion.grit",
|
|
8
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-meaningless-test.grit",
|
|
9
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-useless-abstraction.grit",
|
|
10
|
-
"./node_modules/@yuu1111/biome-config/plugins/no-ternary-statement.grit",
|
|
11
|
-
"./node_modules/@yuu1111/biome-config/plugins/require-fetch-abort-signal.grit",
|
|
12
|
-
"./node_modules/@yuu1111/biome-config/plugins/require-abort-timeout-cleanup.grit"
|
|
4
|
+
"./node_modules/@yuu1111/biome-config/plugins/network/require-fetch-abort-signal.grit",
|
|
5
|
+
"./node_modules/@yuu1111/biome-config/plugins/network/require-abort-timeout-cleanup.grit"
|
|
13
6
|
]
|
|
14
7
|
}
|
/package/plugins/{no-incomplete-implementation.grit → core/no-incomplete-implementation.grit}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/plugins/{require-abort-timeout-cleanup.grit → network/require-abort-timeout-cleanup.grit}
RENAMED
|
File without changes
|
/package/plugins/{require-fetch-abort-signal.grit → network/require-fetch-abort-signal.grit}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|