@yuu1111/biome-config 2.2.4 → 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,50 +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.useSingleVarDeclarator` | `error` |
56
- | `style.noNestedTernary`、`style.useErrorCause` | `warn` |
57
- | `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` |
58
59
 
59
60
  ```json
60
61
  {
61
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
62
- "extends": ["@yuu1111/biome-config/biome"]
62
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
63
+ "extends": [
64
+ "@yuu1111/biome-config/biome"
65
+ ]
63
66
  }
64
67
  ```
65
68
 
@@ -69,69 +72,71 @@ CSSのformatterとlinterを足し、Tailwind directiveを有効にする
69
72
 
70
73
  ```json
71
74
  {
72
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
73
- "extends": ["@yuu1111/biome-config/react"]
75
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
76
+ "extends": [
77
+ "@yuu1111/biome-config/react"
78
+ ]
74
79
  }
75
80
  ```
76
81
 
77
82
  ### plugins/core
78
83
 
79
- | Rule | 重大度 | Default | 検出対象 |
80
- |------|----------|---------|---------|
81
- | `no-reexports` | warn | false | 既存bindingを転送するだけのexport(`export type Alias = Imported` など)、`export { imported }` はbaseの `style.noExportedImports`、`export ... from` の形はbaseのbarrel file ruleが担当する |
82
- | `no-incomplete-implementation` | error, warn | false | placeholderのthrowはerror、logだけのcatch、`null`・`[]`・`{}` へ置き換えたrejected promiseとcatchしたerrorはwarn |
83
- | `no-type-safety-bypass` | error, warn | false | `as unknown as T` はerror、`Record<string, unknown>` のassertion、未検証のJSON assertion、静的な `Reflect.get`、receiver無しの `Reflect.apply` はwarn |
84
- | `no-unsafe-errno-assertion` | warn | false | catchした値を検証せず `NodeJS.ErrnoException` のassertion経由で `code` を読むコード |
85
- | `no-meaningless-test` | error, warn | false | identifierやliteralを自分自身と比較する `toBe`・`toEqual`・`toStrictEqual` はerror、空の `test`・`it` callbackはwarn |
86
- | `no-useless-abstraction` | warn | false | 同じ引数を別の関数へ渡すだけの名前付き単一引数arrow function(async版も含む) |
87
- | `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 |
88
93
 
89
94
  ruleは意図的に狭く保つ
90
95
  検証、変換、log、cache、transaction開始などの処理を行うwrapperはpass-through wrapperとして報告しない
91
96
  準備やassertionのあるtestは空として扱わない
92
97
 
93
98
  ```ts
94
- throw new Error("Not implemented")
95
- request.catch(() => null)
99
+ throw new Error("Not implemented");
100
+ request.catch(() => null);
96
101
 
97
- const user = value as unknown as User
98
- const parsed = JSON.parse(text) as User
99
- 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;
100
105
 
101
- test("placeholder", () => {})
102
- expect(result).toEqual(result)
106
+ test("placeholder", () => {});
107
+ expect(result).toEqual(result);
103
108
 
104
- const loadUser = (id) => fetchUser(id)
109
+ const loadUser = (id) => fetchUser(id);
105
110
 
106
- flag ? enable() : disable()
111
+ flag ? enable() : disable();
107
112
  ```
108
113
 
109
114
  理由を添えて意図的な例外を抑制する
110
115
 
111
116
  ```ts
112
117
  // biome-ignore lint/plugin: An optional cache miss is an expected fallback
113
- cacheRequest.catch(() => null)
118
+ cacheRequest.catch(() => null);
114
119
  ```
115
120
 
116
121
  ### plugins/network
117
122
 
118
- | Rule | 重大度 | Default | 検出対象 |
119
- |------|----------|---------|---------|
120
- | `require-fetch-abort-signal` | warn | false | `signal` optionを省いた `fetch` 呼び出し |
121
- | `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しない関数 |
122
127
 
123
128
  ### plugins/discord
124
129
 
125
- | Rule | 重大度 | Default | 検出対象 |
126
- |------|----------|---------|---------|
127
- | `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内容 |
128
133
 
129
134
  ## Scoped rules
130
135
 
131
- | Rule | 重大度 | Default | 検出対象 |
132
- |------|----------|---------|---------|
133
- | `no-adapter-import` | error | false | `integrations/` か `adapters/` を含むpathのimport |
134
- | `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(...)` |
135
140
 
136
141
  対象層を選ぶ `includes` を必要とするため共有presetでは持てない
137
142
  Project自身の設定で宣言する
@@ -140,12 +145,14 @@ Project自身の設定で宣言する
140
145
 
141
146
  ```json
142
147
  {
143
- "plugins": [
144
- {
145
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
146
- "includes": ["**/src/modules/authorization/**"]
147
- }
148
- ]
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
+ ]
149
156
  }
150
157
  ```
151
158
 
@@ -162,10 +169,10 @@ pluginの `path` はfile pathとして解決される
162
169
 
163
170
  ```json
164
171
  {
165
- "includes": [
166
- "**/src/modules/authorization/**",
167
- "!**/src/modules/authorization/adapters/**"
168
- ]
172
+ "includes": [
173
+ "**/src/modules/authorization/**",
174
+ "!**/src/modules/authorization/adapters/**"
175
+ ]
169
176
  }
170
177
  ```
171
178
 
@@ -173,12 +180,14 @@ pluginの `path` はfile pathとして解決される
173
180
 
174
181
  ```json
175
182
  {
176
- "plugins": [
177
- {
178
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
179
- "includes": ["**/src/worker/routes/**"]
180
- }
181
- ]
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
+ ]
182
191
  }
183
192
  ```
184
193
 
package/README.md CHANGED
@@ -16,50 +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.useSingleVarDeclarator` | `error` |
56
- | `style.noNestedTernary`, `style.useErrorCause` | `warn` |
57
- | `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` |
58
59
 
59
60
  ```json
60
61
  {
61
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
62
- "extends": ["@yuu1111/biome-config/biome"]
62
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
63
+ "extends": [
64
+ "@yuu1111/biome-config/biome"
65
+ ]
63
66
  }
64
67
  ```
65
68
 
@@ -69,69 +72,71 @@ Adds the CSS formatter and linter, with the Tailwind directives enabled.
69
72
 
70
73
  ```json
71
74
  {
72
- "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
73
- "extends": ["@yuu1111/biome-config/react"]
75
+ "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
76
+ "extends": [
77
+ "@yuu1111/biome-config/react"
78
+ ]
74
79
  }
75
80
  ```
76
81
 
77
82
  ### plugins/core
78
83
 
79
- | Rule | Severity | Default | Detects |
80
- |------|----------|---------|---------|
81
- | `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 |
82
- | `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 |
83
- | `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 |
84
- | `no-unsafe-errno-assertion` | warn | false | Reading `code` through a `NodeJS.ErrnoException` assertion without validating the caught value |
85
- | `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 |
86
- | `no-useless-abstraction` | warn | false | A named single-argument arrow function that only passes the same argument to another function, including the async form |
87
- | `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()` |
88
93
 
89
94
  The rules stay narrow.
90
95
  A wrapper that validates, transforms, logs, caches, starts a transaction, or performs another operation is not reported as a pass-through wrapper.
91
96
  A test with setup or assertions is not treated as empty.
92
97
 
93
98
  ```ts
94
- throw new Error("Not implemented")
95
- request.catch(() => null)
99
+ throw new Error("Not implemented");
100
+ request.catch(() => null);
96
101
 
97
- const user = value as unknown as User
98
- const parsed = JSON.parse(text) as User
99
- 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;
100
105
 
101
- test("placeholder", () => {})
102
- expect(result).toEqual(result)
106
+ test("placeholder", () => {});
107
+ expect(result).toEqual(result);
103
108
 
104
- const loadUser = (id) => fetchUser(id)
109
+ const loadUser = (id) => fetchUser(id);
105
110
 
106
- flag ? enable() : disable()
111
+ flag ? enable() : disable();
107
112
  ```
108
113
 
109
114
  Suppress an intentional exception with a reason:
110
115
 
111
116
  ```ts
112
117
  // biome-ignore lint/plugin: An optional cache miss is an expected fallback
113
- cacheRequest.catch(() => null)
118
+ cacheRequest.catch(() => null);
114
119
  ```
115
120
 
116
121
  ### plugins/network
117
122
 
118
- | Rule | Severity | Default | Detects |
119
- |------|----------|---------|---------|
120
- | `require-fetch-abort-signal` | warn | false | A `fetch` call that omits the `signal` option |
121
- | `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 |
122
127
 
123
128
  ### plugins/discord
124
129
 
125
- | Rule | Severity | Default | Detects |
126
- |------|----------|---------|---------|
127
- | `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 |
128
133
 
129
134
  ## Scoped rules
130
135
 
131
- | Rule | Severity | Default | Detects |
132
- |------|----------|---------|---------|
133
- | `no-adapter-import` | error | false | An import of a path that contains `integrations/` or `adapters/` |
134
- | `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 |
135
140
 
136
141
  They need `includes` to name the layer they protect, so a shared preset cannot carry them.
137
142
  Declare them in the project's own configuration.
@@ -140,12 +145,14 @@ Declare them in the project's own configuration.
140
145
 
141
146
  ```json
142
147
  {
143
- "plugins": [
144
- {
145
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-adapter-import.grit",
146
- "includes": ["**/src/modules/authorization/**"]
147
- }
148
- ]
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
+ ]
149
156
  }
150
157
  ```
151
158
 
@@ -160,10 +167,10 @@ A module that keeps its own adapter implementations under an `adapters/` directo
160
167
 
161
168
  ```json
162
169
  {
163
- "includes": [
164
- "**/src/modules/authorization/**",
165
- "!**/src/modules/authorization/adapters/**"
166
- ]
170
+ "includes": [
171
+ "**/src/modules/authorization/**",
172
+ "!**/src/modules/authorization/adapters/**"
173
+ ]
167
174
  }
168
175
  ```
169
176
 
@@ -171,12 +178,14 @@ A module that keeps its own adapter implementations under an `adapters/` directo
171
178
 
172
179
  ```json
173
180
  {
174
- "plugins": [
175
- {
176
- "path": "./node_modules/@yuu1111/biome-config/plugins/scoped/no-direct-response.grit",
177
- "includes": ["**/src/worker/routes/**"]
178
- }
179
- ]
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
+ ]
180
189
  }
181
190
  ```
182
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,6 +37,7 @@
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuu1111/biome-config",
3
- "version": "2.2.4",
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,6 +37,7 @@
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",