@yuu1111/biome-config 2.2.3 → 2.2.5

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
@@ -16,49 +16,53 @@ bun add -D @yuu1111/biome-config
16
16
 
17
17
  ```json
18
18
  {
19
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
20
- "extends": [
21
- "@yuu1111/biome-config/biome",
22
- "@yuu1111/biome-config/plugins/core"
23
- ]
19
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
20
+ "extends": [
21
+ "@yuu1111/biome-config/biome",
22
+ "@yuu1111/biome-config/plugins/core"
23
+ ]
24
24
  }
25
25
  ```
26
26
 
27
27
  ## Presets
28
28
 
29
- | Preset | 用途 |
30
- |--------|------|
31
- | `biome` | formatter、lint rule、VCS連携 |
32
- | `react` | `biome` にCSSとTailwindを足す |
33
- | `plugins/core` | 汎用のrule plugin 7つ |
34
- | `plugins/network` | `fetch` のrule plugin 2つ |
35
- | `plugins/discord` | Discordのrule plugin 1つ |
29
+ | Preset | 用途 |
30
+ | ----------------- | ----------------------------- |
31
+ | `biome` | formatter、lint rule、VCS連携 |
32
+ | `react` | `biome` にCSSとTailwindを足す |
33
+ | `plugins/core` | 汎用のrule plugin 7つ |
34
+ | `plugins/network` | `fetch` のrule plugin 2つ |
35
+ | `plugins/discord` | Discordのrule plugin 1つ |
36
36
 
37
37
  `biome` と `react` は完結した設定で、`plugins/*` はruleだけを足す
38
38
  `biome` か `react` の後ろへ並べ、presetをextendsするまでそれぞれのruleは無効になる
39
39
 
40
40
  ### biome
41
41
 
42
- | Setting | 値 |
43
- |---------|-----|
44
- | `vcs` | git、`useIgnoreFile` |
45
- | `formatter` | 有効、`indentStyle: "tab"` |
46
- | `javascript.formatter.quoteStyle` | `double` |
47
- | `json.formatter.expand` | `always` |
48
- | `assist.source.organizeImports` | `on` |
49
- | `linter.rules.recommended` | `true` |
50
- | `nursery.noFloatingPromises` | `warn` |
51
- | `nursery.useImportsFirst` | `error` |
52
- | `performance.noBarrelFile`、`performance.noReExportAll` | `error` |
53
- | `complexity.noExcessiveCognitiveComplexity` | `warn` |
54
- | `style.noExportedImports` | `error` |
55
- | `style.noNestedTernary`、`style.useErrorCause` | `warn` |
56
- | `suspicious.noEmptyBlockStatements` | `warn` |
42
+ | Setting | 値 |
43
+ | ------------------------------------------------------- | -------------------------- |
44
+ | `vcs` | git、`useIgnoreFile` |
45
+ | `formatter` | 有効、`indentStyle: "tab"` |
46
+ | `javascript.formatter.quoteStyle` | `double` |
47
+ | `json.formatter.expand` | `always` |
48
+ | `markdown.formatter.enabled` | `true` |
49
+ | `assist.source.organizeImports` | `on` |
50
+ | `linter.rules.preset` | `recommended` |
51
+ | `nursery.noFloatingPromises` | `warn` |
52
+ | `style.useImportsFirst` | `error` |
53
+ | `performance.noBarrelFile`、`performance.noReExportAll` | `error` |
54
+ | `complexity.noExcessiveCognitiveComplexity` | `warn` |
55
+ | `style.noExportedImports` | `error` |
56
+ | `style.useSingleVarDeclarator` | `error` |
57
+ | `style.noNestedTernary`、`style.useErrorCause` | `warn` |
58
+ | `suspicious.noEmptyBlockStatements` | `warn` |
57
59
 
58
60
  ```json
59
61
  {
60
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
61
- "extends": ["@yuu1111/biome-config/biome"]
62
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
63
+ "extends": [
64
+ "@yuu1111/biome-config/biome"
65
+ ]
62
66
  }
63
67
  ```
64
68
 
@@ -68,69 +72,71 @@ CSSのformatterとlinterを足し、Tailwind directiveを有効にする
68
72
 
69
73
  ```json
70
74
  {
71
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
72
- "extends": ["@yuu1111/biome-config/react"]
75
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
76
+ "extends": [
77
+ "@yuu1111/biome-config/react"
78
+ ]
73
79
  }
74
80
  ```
75
81
 
76
82
  ### plugins/core
77
83
 
78
- | Rule | 重大度 | Default | 検出対象 |
79
- |------|----------|---------|---------|
80
- | `no-reexports` | warn | false | 既存bindingを転送するだけのexport(`export type Alias = Imported` など)、`export { imported }` はbaseの `style.noExportedImports`、`export ... from` の形はbaseのbarrel file ruleが担当する |
81
- | `no-incomplete-implementation` | error, warn | false | placeholderのthrowはerror、logだけのcatch、`null`・`[]`・`{}` へ置き換えたrejected promiseとcatchしたerrorはwarn |
82
- | `no-type-safety-bypass` | error, warn | false | `as unknown as T` はerror、`Record<string, unknown>` のassertion、未検証のJSON assertion、静的な `Reflect.get`、receiver無しの `Reflect.apply` はwarn |
83
- | `no-unsafe-errno-assertion` | warn | false | catchした値を検証せず `NodeJS.ErrnoException` のassertion経由で `code` を読むコード |
84
- | `no-meaningless-test` | error, warn | false | identifierやliteralを自分自身と比較する `toBe`・`toEqual`・`toStrictEqual` はerror、空の `test`・`it` callbackはwarn |
85
- | `no-useless-abstraction` | warn | false | 同じ引数を別の関数へ渡すだけの名前付き単一引数arrow function(async版も含む) |
86
- | `no-ternary-statement` | warn | false | `flag ? enable() : disable()` のような文としてのternary |
84
+ | Rule | 重大度 | Default | 検出対象 |
85
+ | ------------------------------ | ----------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
86
+ | `no-reexports` | warn | false | 既存bindingを転送するだけのexport(`export type Alias = Imported` など)、`export { imported }` はbaseの `style.noExportedImports`、`export ... from` の形はbaseのbarrel file ruleが担当する |
87
+ | `no-incomplete-implementation` | error, warn | false | placeholderのthrowはerror、logだけのcatch、`null`・`[]`・`{}` へ置き換えたrejected promiseとcatchしたerrorはwarn |
88
+ | `no-type-safety-bypass` | error, warn | false | `as unknown as T` はerror、`Record<string, unknown>` のassertion、未検証のJSON assertion、静的な `Reflect.get`、receiver無しの `Reflect.apply` はwarn |
89
+ | `no-unsafe-errno-assertion` | warn | false | catchした値を検証せず `NodeJS.ErrnoException` のassertion経由で `code` を読むコード |
90
+ | `no-meaningless-test` | error, warn | false | identifierやliteralを自分自身と比較する `toBe`・`toEqual`・`toStrictEqual` はerror、空の `test`・`it` callbackはwarn |
91
+ | `no-useless-abstraction` | warn | false | 同じ引数を別の関数へ渡すだけの名前付き単一引数arrow function(async版も含む) |
92
+ | `no-ternary-statement` | warn | false | `flag ? enable() : disable()` のような文としてのternary |
87
93
 
88
94
  ruleは意図的に狭く保つ
89
95
  検証、変換、log、cache、transaction開始などの処理を行うwrapperはpass-through wrapperとして報告しない
90
96
  準備やassertionのあるtestは空として扱わない
91
97
 
92
98
  ```ts
93
- throw new Error("Not implemented")
94
- request.catch(() => null)
99
+ throw new Error("Not implemented");
100
+ request.catch(() => null);
95
101
 
96
- const user = value as unknown as User
97
- const parsed = JSON.parse(text) as User
98
- const code = (error as NodeJS.ErrnoException).code
102
+ const user = value as unknown as User;
103
+ const parsed = JSON.parse(text) as User;
104
+ const code = (error as NodeJS.ErrnoException).code;
99
105
 
100
- test("placeholder", () => {})
101
- expect(result).toEqual(result)
106
+ test("placeholder", () => {});
107
+ expect(result).toEqual(result);
102
108
 
103
- const loadUser = (id) => fetchUser(id)
109
+ const loadUser = (id) => fetchUser(id);
104
110
 
105
- flag ? enable() : disable()
111
+ flag ? enable() : disable();
106
112
  ```
107
113
 
108
114
  理由を添えて意図的な例外を抑制する
109
115
 
110
116
  ```ts
111
117
  // biome-ignore lint/plugin: An optional cache miss is an expected fallback
112
- cacheRequest.catch(() => null)
118
+ cacheRequest.catch(() => null);
113
119
  ```
114
120
 
115
121
  ### plugins/network
116
122
 
117
- | Rule | 重大度 | Default | 検出対象 |
118
- |------|----------|---------|---------|
119
- | `require-fetch-abort-signal` | warn | false | `signal` optionを省いた `fetch` 呼び出し |
120
- | `require-abort-timeout-cleanup` | warn | false | `setTimeout` callbackで `fetch` をabortしながらそのtimerをclearしない関数 |
123
+ | Rule | 重大度 | Default | 検出対象 |
124
+ | ------------------------------- | ------ | ------- | ------------------------------------------------------------------------- |
125
+ | `require-fetch-abort-signal` | warn | false | `signal` optionを省いた `fetch` 呼び出し |
126
+ | `require-abort-timeout-cleanup` | warn | false | `setTimeout` callbackで `fetch` をabortしながらそのtimerをclearしない関数 |
121
127
 
122
128
  ### plugins/discord
123
129
 
124
- | Rule | 重大度 | Default | 検出対象 |
125
- |------|----------|---------|---------|
126
- | `no-unsafe-dynamic-discord-message` | warn | false | 明示的な `allowedMentions` policy無しで送る動的なmessage内容 |
130
+ | Rule | 重大度 | Default | 検出対象 |
131
+ | ----------------------------------- | ------ | ------- | ------------------------------------------------------------ |
132
+ | `no-unsafe-dynamic-discord-message` | warn | false | 明示的な `allowedMentions` policy無しで送る動的なmessage内容 |
127
133
 
128
134
  ## Scoped rules
129
135
 
130
- | Rule | 重大度 | Default | 検出対象 |
131
- |------|----------|---------|---------|
132
- | `no-adapter-import` | error | false | `integrations/` か `adapters/` を含むpathのimport |
133
- | `no-direct-response` | error | false | 対象層での `new Response(...)`、`Response.json(...)`、`Response.redirect(...)` |
136
+ | Rule | 重大度 | Default | 検出対象 |
137
+ | -------------------- | ------ | ------- | ------------------------------------------------------------------------------ |
138
+ | `no-adapter-import` | error | false | `integrations/` か `adapters/` を含むpathのimport |
139
+ | `no-direct-response` | error | false | 対象層での `new Response(...)`、`Response.json(...)`、`Response.redirect(...)` |
134
140
 
135
141
  対象層を選ぶ `includes` を必要とするため共有presetでは持てない
136
142
  Project自身の設定で宣言する
@@ -139,12 +145,14 @@ Project自身の設定で宣言する
139
145
 
140
146
  ```json
141
147
  {
142
- "plugins": [
143
- {
144
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
145
- "includes": ["**/src/modules/authorization/**"]
146
- }
147
- ]
148
+ "plugins": [
149
+ {
150
+ "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
151
+ "includes": [
152
+ "**/src/modules/authorization/**"
153
+ ]
154
+ }
155
+ ]
148
156
  }
149
157
  ```
150
158
 
@@ -161,10 +169,10 @@ pluginの `path` はfile pathとして解決される
161
169
 
162
170
  ```json
163
171
  {
164
- "includes": [
165
- "**/src/modules/authorization/**",
166
- "!**/src/modules/authorization/adapters/**"
167
- ]
172
+ "includes": [
173
+ "**/src/modules/authorization/**",
174
+ "!**/src/modules/authorization/adapters/**"
175
+ ]
168
176
  }
169
177
  ```
170
178
 
@@ -172,12 +180,14 @@ pluginの `path` はfile pathとして解決される
172
180
 
173
181
  ```json
174
182
  {
175
- "plugins": [
176
- {
177
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
178
- "includes": ["**/src/worker/routes/**"]
179
- }
180
- ]
183
+ "plugins": [
184
+ {
185
+ "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
186
+ "includes": [
187
+ "**/src/worker/routes/**"
188
+ ]
189
+ }
190
+ ]
181
191
  }
182
192
  ```
183
193
 
package/README.md CHANGED
@@ -16,49 +16,53 @@ Extend `biome` and add the rule layers the project needs:
16
16
 
17
17
  ```json
18
18
  {
19
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
20
- "extends": [
21
- "@yuu1111/biome-config/biome",
22
- "@yuu1111/biome-config/plugins/core"
23
- ]
19
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
20
+ "extends": [
21
+ "@yuu1111/biome-config/biome",
22
+ "@yuu1111/biome-config/plugins/core"
23
+ ]
24
24
  }
25
25
  ```
26
26
 
27
27
  ## Presets
28
28
 
29
- | Preset | Use case |
30
- |--------|----------|
31
- | `biome` | Formatter, lint rules, and VCS integration |
32
- | `react` | `biome` plus CSS and Tailwind |
33
- | `plugins/core` | Seven general-purpose rule plugins |
34
- | `plugins/network` | Two `fetch` rule plugins |
35
- | `plugins/discord` | One Discord rule plugin |
29
+ | Preset | Use case |
30
+ | ----------------- | ------------------------------------------ |
31
+ | `biome` | Formatter, lint rules, and VCS integration |
32
+ | `react` | `biome` plus CSS and Tailwind |
33
+ | `plugins/core` | Seven general-purpose rule plugins |
34
+ | `plugins/network` | Two `fetch` rule plugins |
35
+ | `plugins/discord` | One Discord rule plugin |
36
36
 
37
37
  `biome` and `react` are complete configurations.
38
38
  The `plugins/*` presets only add rules, so list them after `biome` or `react`; their rules are off until the preset is extended.
39
39
 
40
40
  ### biome
41
41
 
42
- | Setting | Value |
43
- |---------|-------|
44
- | `vcs` | git, `useIgnoreFile` |
45
- | `formatter` | enabled, `indentStyle: "tab"` |
46
- | `javascript.formatter.quoteStyle` | `double` |
47
- | `json.formatter.expand` | `always` |
48
- | `assist.source.organizeImports` | `on` |
49
- | `linter.rules.recommended` | `true` |
50
- | `nursery.noFloatingPromises` | `warn` |
51
- | `nursery.useImportsFirst` | `error` |
52
- | `performance.noBarrelFile`, `performance.noReExportAll` | `error` |
53
- | `complexity.noExcessiveCognitiveComplexity` | `warn` |
54
- | `style.noExportedImports` | `error` |
55
- | `style.noNestedTernary`, `style.useErrorCause` | `warn` |
56
- | `suspicious.noEmptyBlockStatements` | `warn` |
42
+ | Setting | Value |
43
+ | ------------------------------------------------------- | ----------------------------- |
44
+ | `vcs` | git, `useIgnoreFile` |
45
+ | `formatter` | enabled, `indentStyle: "tab"` |
46
+ | `javascript.formatter.quoteStyle` | `double` |
47
+ | `json.formatter.expand` | `always` |
48
+ | `markdown.formatter.enabled` | `true` |
49
+ | `assist.source.organizeImports` | `on` |
50
+ | `linter.rules.preset` | `recommended` |
51
+ | `nursery.noFloatingPromises` | `warn` |
52
+ | `style.useImportsFirst` | `error` |
53
+ | `performance.noBarrelFile`, `performance.noReExportAll` | `error` |
54
+ | `complexity.noExcessiveCognitiveComplexity` | `warn` |
55
+ | `style.noExportedImports` | `error` |
56
+ | `style.useSingleVarDeclarator` | `error` |
57
+ | `style.noNestedTernary`, `style.useErrorCause` | `warn` |
58
+ | `suspicious.noEmptyBlockStatements` | `warn` |
57
59
 
58
60
  ```json
59
61
  {
60
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
61
- "extends": ["@yuu1111/biome-config/biome"]
62
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
63
+ "extends": [
64
+ "@yuu1111/biome-config/biome"
65
+ ]
62
66
  }
63
67
  ```
64
68
 
@@ -68,69 +72,71 @@ Adds the CSS formatter and linter, with the Tailwind directives enabled.
68
72
 
69
73
  ```json
70
74
  {
71
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
72
- "extends": ["@yuu1111/biome-config/react"]
75
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
76
+ "extends": [
77
+ "@yuu1111/biome-config/react"
78
+ ]
73
79
  }
74
80
  ```
75
81
 
76
82
  ### plugins/core
77
83
 
78
- | Rule | Severity | Default | Detects |
79
- |------|----------|---------|---------|
80
- | `no-reexports` | warn | false | An export that only forwards an existing binding, such as `export type Alias = Imported` or `export default imported`; `export { imported }` is caught by the base `style.noExportedImports` and the `export ... from` forms by the base barrel-file rules |
81
- | `no-incomplete-implementation` | error, warn | false | A placeholder throw, as an error; a catch block that only logs, or a rejected promise or caught error replaced with `null`, `[]`, or `{}`, as a warning |
82
- | `no-type-safety-bypass` | error, warn | false | `as unknown as T`, as an error; a `Record<string, unknown>` assertion, an unchecked JSON assertion, static `Reflect.get`, or a receiver-free `Reflect.apply`, as a warning |
83
- | `no-unsafe-errno-assertion` | warn | false | Reading `code` through a `NodeJS.ErrnoException` assertion without validating the caught value |
84
- | `no-meaningless-test` | error, warn | false | A `toBe`, `toEqual`, or `toStrictEqual` comparison of an identifier or literal with itself, as an error; an empty `test` or `it` callback, as a warning |
85
- | `no-useless-abstraction` | warn | false | A named single-argument arrow function that only passes the same argument to another function, including the async form |
86
- | `no-ternary-statement` | warn | false | A ternary operator used as a standalone statement, such as `flag ? enable() : disable()` |
84
+ | Rule | Severity | Default | Detects |
85
+ | ------------------------------ | ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
86
+ | `no-reexports` | warn | false | An export that only forwards an existing binding, such as `export type Alias = Imported` or `export default imported`; `export { imported }` is caught by the base `style.noExportedImports` and the `export ... from` forms by the base barrel-file rules |
87
+ | `no-incomplete-implementation` | error, warn | false | A placeholder throw, as an error; a catch block that only logs, or a rejected promise or caught error replaced with `null`, `[]`, or `{}`, as a warning |
88
+ | `no-type-safety-bypass` | error, warn | false | `as unknown as T`, as an error; a `Record<string, unknown>` assertion, an unchecked JSON assertion, static `Reflect.get`, or a receiver-free `Reflect.apply`, as a warning |
89
+ | `no-unsafe-errno-assertion` | warn | false | Reading `code` through a `NodeJS.ErrnoException` assertion without validating the caught value |
90
+ | `no-meaningless-test` | error, warn | false | A `toBe`, `toEqual`, or `toStrictEqual` comparison of an identifier or literal with itself, as an error; an empty `test` or `it` callback, as a warning |
91
+ | `no-useless-abstraction` | warn | false | A named single-argument arrow function that only passes the same argument to another function, including the async form |
92
+ | `no-ternary-statement` | warn | false | A ternary operator used as a standalone statement, such as `flag ? enable() : disable()` |
87
93
 
88
94
  The rules stay narrow.
89
95
  A wrapper that validates, transforms, logs, caches, starts a transaction, or performs another operation is not reported as a pass-through wrapper.
90
96
  A test with setup or assertions is not treated as empty.
91
97
 
92
98
  ```ts
93
- throw new Error("Not implemented")
94
- request.catch(() => null)
99
+ throw new Error("Not implemented");
100
+ request.catch(() => null);
95
101
 
96
- const user = value as unknown as User
97
- const parsed = JSON.parse(text) as User
98
- const code = (error as NodeJS.ErrnoException).code
102
+ const user = value as unknown as User;
103
+ const parsed = JSON.parse(text) as User;
104
+ const code = (error as NodeJS.ErrnoException).code;
99
105
 
100
- test("placeholder", () => {})
101
- expect(result).toEqual(result)
106
+ test("placeholder", () => {});
107
+ expect(result).toEqual(result);
102
108
 
103
- const loadUser = (id) => fetchUser(id)
109
+ const loadUser = (id) => fetchUser(id);
104
110
 
105
- flag ? enable() : disable()
111
+ flag ? enable() : disable();
106
112
  ```
107
113
 
108
114
  Suppress an intentional exception with a reason:
109
115
 
110
116
  ```ts
111
117
  // biome-ignore lint/plugin: An optional cache miss is an expected fallback
112
- cacheRequest.catch(() => null)
118
+ cacheRequest.catch(() => null);
113
119
  ```
114
120
 
115
121
  ### plugins/network
116
122
 
117
- | Rule | Severity | Default | Detects |
118
- |------|----------|---------|---------|
119
- | `require-fetch-abort-signal` | warn | false | A `fetch` call that omits the `signal` option |
120
- | `require-abort-timeout-cleanup` | warn | false | A function that aborts a `fetch` request from a `setTimeout` callback but never clears the timer |
123
+ | Rule | Severity | Default | Detects |
124
+ | ------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------ |
125
+ | `require-fetch-abort-signal` | warn | false | A `fetch` call that omits the `signal` option |
126
+ | `require-abort-timeout-cleanup` | warn | false | A function that aborts a `fetch` request from a `setTimeout` callback but never clears the timer |
121
127
 
122
128
  ### plugins/discord
123
129
 
124
- | Rule | Severity | Default | Detects |
125
- |------|----------|---------|---------|
126
- | `no-unsafe-dynamic-discord-message` | warn | false | Dynamic message content sent without an explicit `allowedMentions` policy |
130
+ | Rule | Severity | Default | Detects |
131
+ | ----------------------------------- | -------- | ------- | ------------------------------------------------------------------------- |
132
+ | `no-unsafe-dynamic-discord-message` | warn | false | Dynamic message content sent without an explicit `allowedMentions` policy |
127
133
 
128
134
  ## Scoped rules
129
135
 
130
- | Rule | Severity | Default | Detects |
131
- |------|----------|---------|---------|
132
- | `no-adapter-import` | error | false | An import of a path that contains `integrations/` or `adapters/` |
133
- | `no-direct-response` | error | false | `new Response(...)`, `Response.json(...)`, or `Response.redirect(...)` in the scoped layer |
136
+ | Rule | Severity | Default | Detects |
137
+ | -------------------- | -------- | ------- | ------------------------------------------------------------------------------------------ |
138
+ | `no-adapter-import` | error | false | An import of a path that contains `integrations/` or `adapters/` |
139
+ | `no-direct-response` | error | false | `new Response(...)`, `Response.json(...)`, or `Response.redirect(...)` in the scoped layer |
134
140
 
135
141
  They need `includes` to name the layer they protect, so a shared preset cannot carry them.
136
142
  Declare them in the project's own configuration.
@@ -139,12 +145,14 @@ Declare them in the project's own configuration.
139
145
 
140
146
  ```json
141
147
  {
142
- "plugins": [
143
- {
144
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
145
- "includes": ["**/src/modules/authorization/**"]
146
- }
147
- ]
148
+ "plugins": [
149
+ {
150
+ "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
151
+ "includes": [
152
+ "**/src/modules/authorization/**"
153
+ ]
154
+ }
155
+ ]
148
156
  }
149
157
  ```
150
158
 
@@ -159,10 +167,10 @@ A module that keeps its own adapter implementations under an `adapters/` directo
159
167
 
160
168
  ```json
161
169
  {
162
- "includes": [
163
- "**/src/modules/authorization/**",
164
- "!**/src/modules/authorization/adapters/**"
165
- ]
170
+ "includes": [
171
+ "**/src/modules/authorization/**",
172
+ "!**/src/modules/authorization/adapters/**"
173
+ ]
166
174
  }
167
175
  ```
168
176
 
@@ -170,12 +178,14 @@ A module that keeps its own adapter implementations under an `adapters/` directo
170
178
 
171
179
  ```json
172
180
  {
173
- "plugins": [
174
- {
175
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
176
- "includes": ["**/src/worker/routes/**"]
177
- }
178
- ]
181
+ "plugins": [
182
+ {
183
+ "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
184
+ "includes": [
185
+ "**/src/worker/routes/**"
186
+ ]
187
+ }
188
+ ]
179
189
  }
180
190
  ```
181
191
 
package/base.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
3
3
  "vcs": {
4
4
  "enabled": true,
5
5
  "clientKind": "git",
@@ -14,16 +14,20 @@
14
14
  "expand": "always"
15
15
  }
16
16
  },
17
+ "markdown": {
18
+ "formatter": {
19
+ "enabled": true
20
+ }
21
+ },
17
22
  "linter": {
18
23
  "enabled": true,
19
24
  "rules": {
20
- "recommended": true,
25
+ "preset": "recommended",
21
26
  "complexity": {
22
27
  "noExcessiveCognitiveComplexity": "warn"
23
28
  },
24
29
  "nursery": {
25
- "noFloatingPromises": "warn",
26
- "useImportsFirst": "error"
30
+ "noFloatingPromises": "warn"
27
31
  },
28
32
  "performance": {
29
33
  "noBarrelFile": "error",
@@ -33,10 +37,12 @@
33
37
  "noExportedImports": "error",
34
38
  "noNestedTernary": "warn",
35
39
  "noUselessElse": "error",
40
+ "useImportsFirst": "error",
36
41
  "useBlockStatements": "error",
37
42
  "useCollapsedElseIf": "error",
38
43
  "useCollapsedIf": "error",
39
- "useErrorCause": "warn"
44
+ "useErrorCause": "warn",
45
+ "useSingleVarDeclarator": "error"
40
46
  },
41
47
  "suspicious": {
42
48
  "noEmptyBlockStatements": "warn"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuu1111/biome-config",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
4
4
  "description": "Shared Biome configuration",
5
5
  "homepage": "https://yuu1111.github.io/configs/packages/config/biome-config/",
6
6
  "repository": {
@@ -2,7 +2,7 @@ engine biome(1.0)
2
2
  language js(typescript)
3
3
 
4
4
  `const $timer = setTimeout(() => $controller.abort(), $delay)` as $match where {
5
- $match <: within JsFunctionBody() as $scope ,
5
+ $match <: within JsFunctionBody() as $scope,
6
6
  $scope <: contains `fetch($url, { $... })` as $fetch where {
7
7
  $fetch <: contains `signal: $controller.signal`
8
8
  },
package/plugins-core.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
3
3
  "plugins": [
4
4
  "./node_modules/@yuu1111/biome-config/plugins/core/no-reexports.grit",
5
5
  "./node_modules/@yuu1111/biome-config/plugins/core/no-incomplete-implementation.grit",
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
3
3
  "plugins": [
4
4
  "./node_modules/@yuu1111/biome-config/plugins/discord/no-unsafe-dynamic-discord-message.grit"
5
5
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
3
3
  "plugins": [
4
4
  "./node_modules/@yuu1111/biome-config/plugins/network/require-fetch-abort-signal.grit",
5
5
  "./node_modules/@yuu1111/biome-config/plugins/network/require-abort-timeout-cleanup.grit"
package/react.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
3
3
  "vcs": {
4
4
  "enabled": true,
5
5
  "clientKind": "git",
@@ -14,16 +14,20 @@
14
14
  "expand": "always"
15
15
  }
16
16
  },
17
+ "markdown": {
18
+ "formatter": {
19
+ "enabled": true
20
+ }
21
+ },
17
22
  "linter": {
18
23
  "enabled": true,
19
24
  "rules": {
20
- "recommended": true,
25
+ "preset": "recommended",
21
26
  "complexity": {
22
27
  "noExcessiveCognitiveComplexity": "warn"
23
28
  },
24
29
  "nursery": {
25
- "noFloatingPromises": "warn",
26
- "useImportsFirst": "error"
30
+ "noFloatingPromises": "warn"
27
31
  },
28
32
  "performance": {
29
33
  "noBarrelFile": "error",
@@ -33,10 +37,12 @@
33
37
  "noExportedImports": "error",
34
38
  "noNestedTernary": "warn",
35
39
  "noUselessElse": "error",
40
+ "useImportsFirst": "error",
36
41
  "useBlockStatements": "error",
37
42
  "useCollapsedElseIf": "error",
38
43
  "useCollapsedIf": "error",
39
- "useErrorCause": "warn"
44
+ "useErrorCause": "warn",
45
+ "useSingleVarDeclarator": "error"
40
46
  },
41
47
  "suspicious": {
42
48
  "noEmptyBlockStatements": "warn"