@yuu1111/biome-config 1.3.6 → 1.3.7

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 CHANGED
@@ -19,6 +19,12 @@ bun add -D @yuu1111/biome-config
19
19
  }
20
20
  ```
21
21
 
22
+ The base configuration enables the recommended rules, errors on barrel files and re-export-all, and warns about nested ternaries:
23
+
24
+ ```ts
25
+ const size = small ? "s" : medium ? "m" : "l"
26
+ ```
27
+
22
28
  ### React
23
29
 
24
30
  CSS/Tailwind support included.
@@ -46,7 +52,7 @@ Custom rules are opt-in. Add one preset after the base or React configuration:
46
52
 
47
53
  Choose the most specific preset needed by the project:
48
54
 
49
- - `plugins/core` checks re-exports, incomplete implementations, type-safety bypasses, unsafe errno assertions, meaningless tests, pass-through wrappers, nested ternaries, and ternaries used for side effects
55
+ - `plugins/core` checks re-exports, incomplete implementations, type-safety bypasses, unsafe errno assertions, meaningless tests, pass-through wrappers, and ternaries used for side effects
50
56
  - `plugins/network` includes `core`, requires an `AbortSignal` for `fetch`, and checks cleanup for manually scheduled abort timeouts
51
57
  - `plugins/discord` includes `network` and checks dynamic Discord messages for explicit mention handling
52
58
 
@@ -61,7 +67,6 @@ Do not list parent presets separately. Each child preset includes its parent rul
61
67
  - `no-meaningless-test` warns about empty `test` or `it` callbacks and `toBe`, `toEqual`, or `toStrictEqual` comparisons where an identifier or literal is compared with itself
62
68
  - `no-useless-abstraction` warns about named single-argument arrow functions that only pass the same argument to another function, including the equivalent async form
63
69
  - `no-ternary-statement` warns when a ternary operator is used as a standalone statement, such as `flag ? enable() : disable()`, where an if/else statement is clearer
64
- - `no-nested-ternary` (Biome built-in) warns when a ternary operator is nested inside another ternary operator
65
70
 
66
71
  The rules intentionally stay narrow. A wrapper that validates, transforms, logs, caches, starts a transaction, or performs another operation is not reported as a pass-through wrapper. Tests with setup or assertions are not treated as empty.
67
72
 
@@ -80,7 +85,6 @@ expect(result).toEqual(result)
80
85
 
81
86
  const loadUser = (id) => fetchUser(id)
82
87
 
83
- const size = small ? "s" : medium ? "m" : "l"
84
88
  flag ? enable() : disable()
85
89
  ```
86
90
 
package/base.json CHANGED
@@ -21,6 +21,9 @@
21
21
  "performance": {
22
22
  "noBarrelFile": "error",
23
23
  "noReExportAll": "error"
24
+ },
25
+ "style": {
26
+ "noNestedTernary": "warn"
24
27
  }
25
28
  }
26
29
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuu1111/biome-config",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Shared Biome configuration",
5
5
  "license": "MIT",
6
6
  "repository": {
package/plugins-core.json CHANGED
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
3
- "linter": {
4
- "rules": {
5
- "style": {
6
- "noNestedTernary": "warn"
7
- }
8
- }
9
- },
10
3
  "plugins": [
11
4
  "./node_modules/@yuu1111/biome-config/plugins/no-reexports.grit",
12
5
  "./node_modules/@yuu1111/biome-config/plugins/no-incomplete-implementation.grit",
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
3
- "linter": {
4
- "rules": {
5
- "style": {
6
- "noNestedTernary": "warn"
7
- }
8
- }
9
- },
10
3
  "plugins": [
11
4
  "./node_modules/@yuu1111/biome-config/plugins/no-reexports.grit",
12
5
  "./node_modules/@yuu1111/biome-config/plugins/no-incomplete-implementation.grit",
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
3
- "linter": {
4
- "rules": {
5
- "style": {
6
- "noNestedTernary": "warn"
7
- }
8
- }
9
- },
10
3
  "plugins": [
11
4
  "./node_modules/@yuu1111/biome-config/plugins/no-reexports.grit",
12
5
  "./node_modules/@yuu1111/biome-config/plugins/no-incomplete-implementation.grit",
package/react.json CHANGED
@@ -21,6 +21,9 @@
21
21
  "performance": {
22
22
  "noBarrelFile": "error",
23
23
  "noReExportAll": "error"
24
+ },
25
+ "style": {
26
+ "noNestedTernary": "warn"
24
27
  }
25
28
  }
26
29
  },