@yuu1111/biome-config 1.3.9 → 2.0.1

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 CHANGED
@@ -40,25 +40,24 @@ CSS/Tailwind対応を含む
40
40
 
41
41
  ### Custom rule presets
42
42
 
43
- Custom ruleはopt-in baseまたはReact設定の後ろにpresetを1つ足す
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` は `core` を含み、`fetch` に `AbortSignal` を要求し、手動で予約したabort timeoutの後始末を検査する
59
- - `plugins/discord` は `network` を含み、動的なDiscord messageに明示的なmention処理があるかを検査する
57
+ - `plugins/network` は `fetch` に `AbortSignal` を要求し、手動で予約したabort timeoutの後始末を検査する
58
+ - `plugins/discord` は動的なDiscord messageに明示的なmention処理があるかを検査する
60
59
 
61
- 親presetを別に並べない 子presetは親のruleを含む
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. Add one preset after the base or React configuration:
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` includes `core`, requires an `AbortSignal` for `fetch`, and checks cleanup for manually scheduled abort timeouts
59
- - `plugins/discord` includes `network` and checks dynamic Discord messages for explicit mention handling
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
- Do not list parent presets separately. Each child preset includes its parent rules.
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
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@yuu1111/biome-config",
3
- "version": "1.3.9",
3
+ "version": "2.0.1",
4
4
  "description": "Shared Biome configuration",
5
- "license": "MIT",
6
5
  "repository": {
7
6
  "type": "git",
8
7
  "url": "git+https://github.com/yuu1111/configs.git",
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
  }
@@ -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-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",
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
  }
@@ -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/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",
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
  }