@effect/tsgo 0.41.0 → 0.42.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.md CHANGED
@@ -38,12 +38,12 @@ When running in dedicated diagnostics mode, the Effect diagnostics can be emitte
38
38
  <!-- supported-components:start -->
39
39
  ## Supported Package Versions
40
40
 
41
- The following target package versions are supported by `@effect/tsgo@0.41.0`:
41
+ The following target package versions are supported by `@effect/tsgo@0.42.0`:
42
42
 
43
43
  | Component | Supported versions |
44
44
  |---|---|
45
- | TypeScript | `7.0.2`, `7.1.0-dev.20260903.1` |
46
- | Oxlint | `1.79.0`, `1.81.0` |
45
+ | TypeScript | `7.0.2`, `7.1.0-dev.20260907.1` |
46
+ | Oxlint | `1.79.0`, `1.82.0` |
47
47
  | oxlint-tsgolint | `7.0.2001` |
48
48
  <!-- supported-components:end -->
49
49
 
@@ -123,6 +123,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
123
123
  <tr><td colspan="2"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
124
124
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/acquire-release-disposable.md"><code>acquireReleaseDisposable</code></a></td><td>Suggests Effect.acquireDisposable when Effect.acquireRelease only invokes the acquired resource&#39;s disposal protocol</td></tr>
125
125
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/all-of-map-to-for-each.md"><code>allOfMapToForEach</code></a></td><td>Suggests using Effect.forEach instead of Effect.all over an effectful Array#map</td></tr>
126
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-all-tag-dispatch-to-catch-tag.md"><code>catchAllTagDispatchToCatchTag</code></a></td><td>Suggests Effect.catchTag or Effect.catchTags for catch-all handlers that re-fail unmatched tagged errors</td></tr>
126
127
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-all-to-map-error.md"><code>catchAllToMapError</code></a></td><td>Suggests using Effect.mapError instead of Effect.catch + Effect.fail</td></tr>
127
128
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-chain-to-first-success-of.md"><code>catchChainToFirstSuccessOf</code></a></td><td>Suggests Effect.firstSuccessOf for consecutive error-independent Effect.catch fallbacks when the error type is preserved</td></tr>
128
129
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/catch-conditional-refail-to-catch-if.md"><code>catchConditionalRefailToCatchIf</code></a></td><td>Suggests Effect.catchIf, Effect.catchCauseIf, or Effect.catchTag for conditional catch handlers that re-fail their untouched input</td></tr>
@@ -139,6 +140,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
139
140
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-conditional-to-filter-or-fail.md"><code>flatMapConditionalToFilterOrFail</code></a></td><td>Suggests Effect.filterOrFail or Effect.filterOrElse when Effect.flatMap conditionally passes its input through with Effect.succeed</td></tr>
140
141
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-to-map.md"><code>flatMapToMap</code></a></td><td>Suggests using Effect.map instead of Effect.flatMap when the callback only wraps its result with Effect.succeed</td></tr>
141
142
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-some-to-as-some.md"><code>mapSomeToAsSome</code></a></td><td>Suggests using Effect.asSome instead of Effect.map when the mapper only wraps the success value with Option.some</td></tr>
143
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-map-both.md"><code>matchEffectToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.matchEffect only transforms the failure and success channels</td></tr>
144
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-effect-to-match.md"><code>matchEffectToMatch</code></a></td><td>Suggests Effect.match or Effect.matchCause when both Effect.matchEffect handlers only return Effect.succeed</td></tr>
142
145
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missed-pipeable-opportunity.md"><code>missedPipeableOpportunity</code></a></td><td>Suggests using .pipe() for nested function calls</td></tr>
143
146
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-effect-service-dependency.md"><code>missingEffectServiceDependency</code></a></td><td>Checks that Effect.Service dependencies satisfy all required layer inputs</td></tr>
144
147
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-pipeable-signature.md"><code>missingPipeableSignature</code></a></td><td>Reports exported fixed-arity functions whose call signatures have no corresponding pipeable overload</td></tr>
@@ -149,10 +152,12 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
149
152
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-type-property.md"><code>preferSchemaTypeProperty</code></a></td><td>Disallows Schema.Schema.Type&lt;typeof X&gt; in favor of typeof X.Type</td></tr>
150
153
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-succeed-some-or-none.md"><code>preferSucceedSomeOrNone</code></a></td><td>Suggests using Effect.succeedNone or Effect.succeedSome instead of wrapping Option.none or Option.some with Effect.succeed</td></tr>
151
154
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-typed-schema-decoder.md"><code>preferTypedSchemaDecoder</code></a></td><td>Suggests typed Schema decoders when the input is assignable to the schema&#39;s Encoded type</td></tr>
155
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/provide-layer-succeed-to-provide-service.md"><code>provideLayerSucceedToProvideService</code></a></td><td>Suggests providing inline Layer.succeed and Layer.effect services directly</td></tr>
152
156
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/race-first-with-sleep-to-timeout.md"><code>raceFirstWithSleepToTimeout</code></a></td><td>Suggests Effect.timeoutOrElse when Effect.raceFirst has exactly one sleep- or delay-based timer arm</td></tr>
153
157
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-map-error.md"><code>redundantMapError</code></a></td><td>Suggests hoisting a repeated trailing Effect.mapError from every yield in an Effect generator</td></tr>
154
158
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-or-die.md"><code>redundantOrDie</code></a></td><td>Suggests hoisting a repeated trailing Effect.orDie from every yield in an Effect generator</td></tr>
155
159
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/redundant-schema-tag-identifier.md"><code>redundantSchemaTagIdentifier</code></a></td><td>Suggests removing redundant identifier argument when it equals the tag value in Schema.TaggedClass/TaggedError/TaggedRequest</td></tr>
160
+ <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/run-of-exit-to-run-exit.md"><code>runOfExitToRunExit</code></a></td><td>Suggests using Effect.runPromiseExit instead of passing Effect.exit to Effect.runPromise</td></tr>
156
161
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-number.md"><code>schemaNumber</code></a></td><td>Suggests Schema.Finite and Schema.FiniteFromString instead of Schema.Number APIs when describing domain numbers</td></tr>
157
162
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-struct-with-tag.md"><code>schemaStructWithTag</code></a></td><td>Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field</td></tr>
158
163
  <tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-union-of-literals.md"><code>schemaUnionOfLiterals</code></a></td><td>Suggests combining multiple Schema.Literal calls in Schema.Union into a single Schema.Literal</td></tr>
@@ -48900,7 +48900,7 @@ const runWith = (command, config) => {
48900
48900
  //#endregion
48901
48901
  //#region package.json
48902
48902
  var name = "@effect/tsgo";
48903
- var version = "0.41.0";
48903
+ var version = "0.42.0";
48904
48904
 
48905
48905
  //#endregion
48906
48906
  //#region src/metadata.json
@@ -50032,6 +50032,23 @@ var rules = [
50032
50032
  }]
50033
50033
  }
50034
50034
  },
50035
+ {
50036
+ "name": "catchAllTagDispatchToCatchTag",
50037
+ "group": "style",
50038
+ "description": "Suggests Effect.catchTag or Effect.catchTags for catch-all handlers that re-fail unmatched tagged errors",
50039
+ "defaultSeverity": "suggestion",
50040
+ "fixable": true,
50041
+ "supportedEffect": ["v3", "v4"],
50042
+ "codes": [377122],
50043
+ "preview": {
50044
+ "sourceText": "import { Data, Effect } from \"effect\"\n\nclass NotFound extends Data.TaggedError(\"NotFound\")<{}> {}\nclass Timeout extends Data.TaggedError(\"Timeout\")<{}> {}\nclass Unauthorized extends Data.TaggedError(\"Unauthorized\")<{}> {}\n\ndeclare const program: Effect.Effect<string, NotFound | Timeout | Unauthorized>\n\nexport const recovered = program.pipe(\n Effect.catch((error) => {\n switch (error._tag) {\n case \"NotFound\":\n return Effect.succeed(\"guest\")\n case \"Timeout\":\n return Effect.succeed(\"retrying\")\n default:\n return Effect.fail(error)\n }\n })\n)\n",
50045
+ "diagnostics": [{
50046
+ "start": 345,
50047
+ "end": 357,
50048
+ "text": "Branching on `error._tag` inside `Effect.catch` hand-rolls tagged error dispatch; use `Effect.catchTag` or `Effect.catchTags`, which re-fail unmatched errors automatically. effect(catchAllTagDispatchToCatchTag)"
50049
+ }]
50050
+ }
50051
+ },
50035
50052
  {
50036
50053
  "name": "catchAllToMapError",
50037
50054
  "group": "style",
@@ -50075,11 +50092,11 @@ var rules = [
50075
50092
  "supportedEffect": ["v4"],
50076
50093
  "codes": [377116],
50077
50094
  "preview": {
50078
- "sourceText": "import { Data, Effect } from \"effect\"\n\nclass NotFound extends Data.TaggedError(\"NotFound\")<{}> {}\nclass DatabaseError extends Data.TaggedError(\"DatabaseError\")<{}> {}\n\ndeclare const program: Effect.Effect<string, NotFound | DatabaseError>\n\nexport const recovered = program.pipe(\n Effect.catch((error) =>\n error._tag === \"NotFound\" ? Effect.succeed(\"guest\") : Effect.fail(error)\n )\n)\n",
50095
+ "sourceText": "import { Data, Effect } from \"effect\"\n\nclass NotFound extends Data.TaggedError(\"NotFound\")<{}> {}\nclass DatabaseError extends Data.TaggedError(\"DatabaseError\")<{}> {}\n\ndeclare const program: Effect.Effect<string, NotFound | DatabaseError>\n\nexport const recovered = program.pipe(\n Effect.catch((error) =>\n error instanceof NotFound ? Effect.succeed(\"guest\") : Effect.fail(error)\n )\n)\n",
50079
50096
  "diagnostics": [{
50080
50097
  "start": 281,
50081
50098
  "end": 293,
50082
- "text": "`Effect.catchTag` expresses selective recovery more directly than `Effect.catch` with a conditional `Effect.fail` passthrough. effect(catchConditionalRefailToCatchIf)"
50099
+ "text": "`Effect.catchIf` expresses selective recovery more directly than `Effect.catch` with a conditional `Effect.fail` passthrough. effect(catchConditionalRefailToCatchIf)"
50083
50100
  }]
50084
50101
  }
50085
50102
  },
@@ -50316,6 +50333,40 @@ var rules = [
50316
50333
  ]
50317
50334
  }
50318
50335
  },
50336
+ {
50337
+ "name": "matchEffectToMapBoth",
50338
+ "group": "style",
50339
+ "description": "Suggests Effect.mapBoth when Effect.matchEffect only transforms the failure and success channels",
50340
+ "defaultSeverity": "suggestion",
50341
+ "fixable": true,
50342
+ "supportedEffect": ["v3", "v4"],
50343
+ "codes": [377126],
50344
+ "preview": {
50345
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const program: Effect.Effect<number, string>\n\nprogram.pipe(Effect.matchEffect({\n onFailure: (error) => Effect.fail(error.length),\n onSuccess: (value) => Effect.succeed(value + 1)\n}))\n",
50346
+ "diagnostics": [{
50347
+ "start": 100,
50348
+ "end": 118,
50349
+ "text": "`Effect.mapBoth` expresses these failure and success transformations more directly than `Effect.matchEffect`. effect(matchEffectToMapBoth)"
50350
+ }]
50351
+ }
50352
+ },
50353
+ {
50354
+ "name": "matchEffectToMatch",
50355
+ "group": "style",
50356
+ "description": "Suggests Effect.match or Effect.matchCause when both Effect.matchEffect handlers only return Effect.succeed",
50357
+ "defaultSeverity": "suggestion",
50358
+ "fixable": true,
50359
+ "supportedEffect": ["v3", "v4"],
50360
+ "codes": [377125],
50361
+ "preview": {
50362
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const program: Effect.Effect<number, string>\n\nprogram.pipe(Effect.matchEffect({\n onFailure: (error) => Effect.succeed(error.length),\n onSuccess: (value) => Effect.succeed(value + 1)\n}))\n",
50363
+ "diagnostics": [{
50364
+ "start": 100,
50365
+ "end": 118,
50366
+ "text": "`Effect.match` expresses this non-effectful fold more directly than `Effect.matchEffect` with `Effect.succeed` handlers. effect(matchEffectToMatch)"
50367
+ }]
50368
+ }
50369
+ },
50319
50370
  {
50320
50371
  "name": "missedPipeableOpportunity",
50321
50372
  "group": "style",
@@ -50490,6 +50541,23 @@ var rules = [
50490
50541
  }]
50491
50542
  }
50492
50543
  },
50544
+ {
50545
+ "name": "provideLayerSucceedToProvideService",
50546
+ "group": "style",
50547
+ "description": "Suggests providing inline Layer.succeed and Layer.effect services directly",
50548
+ "defaultSeverity": "suggestion",
50549
+ "fixable": true,
50550
+ "supportedEffect": ["v4"],
50551
+ "codes": [377124],
50552
+ "preview": {
50553
+ "sourceText": "import { Context, Effect, Layer } from \"effect\"\n\nclass Service extends Context.Service<Service, { readonly value: number }>()(\"Service\") {}\n\nconst program = Service.use((service) => Effect.succeed(service.value)).pipe(\n Effect.provide(Layer.succeed(Service, { value: 1 }))\n)\n",
50554
+ "diagnostics": [{
50555
+ "start": 221,
50556
+ "end": 235,
50557
+ "text": "`Effect.provideService` provides this inline single-service layer directly. effect(provideLayerSucceedToProvideService)"
50558
+ }]
50559
+ }
50560
+ },
50493
50561
  {
50494
50562
  "name": "raceFirstWithSleepToTimeout",
50495
50563
  "group": "style",
@@ -50558,6 +50626,23 @@ var rules = [
50558
50626
  }]
50559
50627
  }
50560
50628
  },
50629
+ {
50630
+ "name": "runOfExitToRunExit",
50631
+ "group": "style",
50632
+ "description": "Suggests using Effect.runPromiseExit instead of passing Effect.exit to Effect.runPromise",
50633
+ "defaultSeverity": "suggestion",
50634
+ "fixable": true,
50635
+ "supportedEffect": ["v3", "v4"],
50636
+ "codes": [377123],
50637
+ "preview": {
50638
+ "sourceText": "import { Effect } from \"effect\"\n\ndeclare const program: Effect.Effect<number, Error>\n\nexport const exit = Effect.runPromise(Effect.exit(program))\n",
50639
+ "diagnostics": [{
50640
+ "start": 106,
50641
+ "end": 123,
50642
+ "text": "`Effect.runPromise` of `Effect.exit` re-implements `Effect.runPromiseExit`. Use the dedicated Exit runner directly. effect(runOfExitToRunExit)"
50643
+ }]
50644
+ }
50645
+ },
50561
50646
  {
50562
50647
  "name": "schemaNumber",
50563
50648
  "group": "style",
@@ -50782,9 +50867,9 @@ var metadata_default = {
50782
50867
  var tags = {
50783
50868
  "typescript": {
50784
50869
  "latest": "7.0.2",
50785
- "next": "7.1.0-dev.20260903.1"
50870
+ "next": "7.1.0-dev.20260907.1"
50786
50871
  },
50787
- "oxlint": { "latest": "1.81.0" },
50872
+ "oxlint": { "latest": "1.82.0" },
50788
50873
  "oxlint-tsgolint": { "latest": "7.0.2001" }
50789
50874
  };
50790
50875
  var components = {
@@ -50793,8 +50878,8 @@ var components = {
50793
50878
  "gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b",
50794
50879
  "provider": "typescript-go"
50795
50880
  },
50796
- "7.1.0-dev.20260903.1": {
50797
- "gitHead": "cf7b9361a33fa0c8e1afa3cf45fde29c9ab23ec0",
50881
+ "7.1.0-dev.20260907.1": {
50882
+ "gitHead": "1f70213d4922b434345f639b441681e470c7cfc1",
50798
50883
  "provider": "typescript"
50799
50884
  }
50800
50885
  },
@@ -50804,7 +50889,7 @@ var components = {
50804
50889
  } },
50805
50890
  "oxlint": {
50806
50891
  "1.79.0": { "gitHead": "0db127cc16d28b97d84bac4ebeb302caf1a78c7e" },
50807
- "1.81.0": { "gitHead": "0b4e2e67f4193e7ebfcc64982275eb583ae82c83" }
50892
+ "1.82.0": { "gitHead": "b4da00b621ec2f6f67ed218f5366c45ed325331b" }
50808
50893
  }
50809
50894
  };
50810
50895
 
@@ -105,6 +105,7 @@ export const recommended = {
105
105
  "effecttsgo/acquire-release-disposable": "warn",
106
106
  "effecttsgo/all-of-map-to-for-each": "warn",
107
107
  "effecttsgo/async-function": "warn",
108
+ "effecttsgo/catch-all-tag-dispatch-to-catch-tag": "warn",
108
109
  "effecttsgo/catch-all-to-map-error": "warn",
109
110
  "effecttsgo/catch-chain-to-first-success-of": "warn",
110
111
  "effecttsgo/catch-conditional-refail-to-catch-if": "warn",
@@ -176,6 +177,7 @@ export const recommended = {
176
177
  "effecttsgo/redundant-schema-tag-identifier": "warn",
177
178
  "effecttsgo/return-effect-in-gen": "warn",
178
179
  "effecttsgo/run-effect-inside-effect": "warn",
180
+ "effecttsgo/run-of-exit-to-run-exit": "warn",
179
181
  "effecttsgo/schema-literal-non-finite": "error",
180
182
  "effecttsgo/schema-number": "warn",
181
183
  "effecttsgo/schema-opaque-instance-member": "error",
@@ -203,6 +205,7 @@ export const style = {
203
205
  "rules": {
204
206
  "effecttsgo/acquire-release-disposable": "warn",
205
207
  "effecttsgo/all-of-map-to-for-each": "warn",
208
+ "effecttsgo/catch-all-tag-dispatch-to-catch-tag": "warn",
206
209
  "effecttsgo/catch-all-to-map-error": "warn",
207
210
  "effecttsgo/catch-chain-to-first-success-of": "warn",
208
211
  "effecttsgo/catch-conditional-refail-to-catch-if": "warn",
@@ -233,6 +236,7 @@ export const style = {
233
236
  "effecttsgo/redundant-map-error": "warn",
234
237
  "effecttsgo/redundant-or-die": "warn",
235
238
  "effecttsgo/redundant-schema-tag-identifier": "warn",
239
+ "effecttsgo/run-of-exit-to-run-exit": "warn",
236
240
  "effecttsgo/schema-number": "warn",
237
241
  "effecttsgo/schema-struct-with-tag": "warn",
238
242
  "effecttsgo/schema-union-of-literals": "warn",
@@ -10,6 +10,7 @@
10
10
  "effecttsgo/acquire-release-disposable": "warn",
11
11
  "effecttsgo/all-of-map-to-for-each": "warn",
12
12
  "effecttsgo/async-function": "warn",
13
+ "effecttsgo/catch-all-tag-dispatch-to-catch-tag": "warn",
13
14
  "effecttsgo/catch-all-to-map-error": "warn",
14
15
  "effecttsgo/catch-chain-to-first-success-of": "warn",
15
16
  "effecttsgo/catch-conditional-refail-to-catch-if": "warn",
@@ -81,6 +82,7 @@
81
82
  "effecttsgo/redundant-schema-tag-identifier": "warn",
82
83
  "effecttsgo/return-effect-in-gen": "warn",
83
84
  "effecttsgo/run-effect-inside-effect": "warn",
85
+ "effecttsgo/run-of-exit-to-run-exit": "warn",
84
86
  "effecttsgo/schema-literal-non-finite": "error",
85
87
  "effecttsgo/schema-number": "warn",
86
88
  "effecttsgo/schema-opaque-instance-member": "error",
@@ -8,6 +8,7 @@
8
8
  "rules": {
9
9
  "effecttsgo/acquire-release-disposable": "warn",
10
10
  "effecttsgo/all-of-map-to-for-each": "warn",
11
+ "effecttsgo/catch-all-tag-dispatch-to-catch-tag": "warn",
11
12
  "effecttsgo/catch-all-to-map-error": "warn",
12
13
  "effecttsgo/catch-chain-to-first-success-of": "warn",
13
14
  "effecttsgo/catch-conditional-refail-to-catch-if": "warn",
@@ -38,6 +39,7 @@
38
39
  "effecttsgo/redundant-map-error": "warn",
39
40
  "effecttsgo/redundant-or-die": "warn",
40
41
  "effecttsgo/redundant-schema-tag-identifier": "warn",
42
+ "effecttsgo/run-of-exit-to-run-exit": "warn",
41
43
  "effecttsgo/schema-number": "warn",
42
44
  "effecttsgo/schema-struct-with-tag": "warn",
43
45
  "effecttsgo/schema-union-of-literals": "warn",
@@ -2248,6 +2248,9 @@
2248
2248
  "effecttsgo/async-function": {
2249
2249
  "$ref": "#/definitions/RuleNoConfig"
2250
2250
  },
2251
+ "effecttsgo/catch-all-tag-dispatch-to-catch-tag": {
2252
+ "$ref": "#/definitions/RuleNoConfig"
2253
+ },
2251
2254
  "effecttsgo/catch-all-to-map-error": {
2252
2255
  "$ref": "#/definitions/RuleNoConfig"
2253
2256
  },
@@ -2389,6 +2392,12 @@
2389
2392
  "effecttsgo/map-some-to-as-some": {
2390
2393
  "$ref": "#/definitions/RuleNoConfig"
2391
2394
  },
2395
+ "effecttsgo/match-effect-to-map-both": {
2396
+ "$ref": "#/definitions/RuleNoConfig"
2397
+ },
2398
+ "effecttsgo/match-effect-to-match": {
2399
+ "$ref": "#/definitions/RuleNoConfig"
2400
+ },
2392
2401
  "effecttsgo/missed-pipeable-opportunity": {
2393
2402
  "$ref": "#/definitions/RuleNoConfig"
2394
2403
  },
@@ -2467,6 +2476,9 @@
2467
2476
  "effecttsgo/promise-in-effect-success": {
2468
2477
  "$ref": "#/definitions/RuleNoConfig"
2469
2478
  },
2479
+ "effecttsgo/provide-layer-succeed-to-provide-service": {
2480
+ "$ref": "#/definitions/RuleNoConfig"
2481
+ },
2470
2482
  "effecttsgo/race-first-with-sleep-to-timeout": {
2471
2483
  "$ref": "#/definitions/RuleNoConfig"
2472
2484
  },
@@ -2485,6 +2497,9 @@
2485
2497
  "effecttsgo/run-effect-inside-effect": {
2486
2498
  "$ref": "#/definitions/RuleNoConfig"
2487
2499
  },
2500
+ "effecttsgo/run-of-exit-to-run-exit": {
2501
+ "$ref": "#/definitions/RuleNoConfig"
2502
+ },
2488
2503
  "effecttsgo/schema-literal-non-finite": {
2489
2504
  "$ref": "#/definitions/RuleNoConfig"
2490
2505
  },
@@ -5597,7 +5612,24 @@
5597
5612
  "$ref": "#/definitions/RuleNoConfig"
5598
5613
  },
5599
5614
  "no-unmodified-loop-condition": {
5600
- "$ref": "#/definitions/RuleNoConfig"
5615
+ "anyOf": [
5616
+ {
5617
+ "$ref": "#/definitions/RuleNoConfig"
5618
+ },
5619
+ {
5620
+ "items": [
5621
+ {
5622
+ "$ref": "#/definitions/AllowWarnDeny"
5623
+ },
5624
+ {
5625
+ "$ref": "#/definitions/NoUnmodifiedLoopCondition"
5626
+ }
5627
+ ],
5628
+ "maxItems": 2,
5629
+ "minItems": 2,
5630
+ "type": "array"
5631
+ }
5632
+ ]
5601
5633
  },
5602
5634
  "no-unneeded-ternary": {
5603
5635
  "anyOf": [
@@ -16036,6 +16068,18 @@
16036
16068
  },
16037
16069
  "type": "object"
16038
16070
  },
16071
+ "NoUnmodifiedLoopCondition": {
16072
+ "additionalProperties": false,
16073
+ "properties": {
16074
+ "checkConditionalExpressions": {
16075
+ "default": false,
16076
+ "description": "Whether references in each branch of a conditional expression should be checked\nindependently instead of checking the result of the entire expression.",
16077
+ "markdownDescription": "Whether references in each branch of a conditional expression should be checked\nindependently instead of checking the result of the entire expression.",
16078
+ "type": "boolean"
16079
+ }
16080
+ },
16081
+ "type": "object"
16082
+ },
16039
16083
  "NoUnnecessaryBooleanLiteralCompareConfig": {
16040
16084
  "additionalProperties": false,
16041
16085
  "properties": {
@@ -16669,33 +16713,6 @@
16669
16713
  }
16670
16714
  ]
16671
16715
  },
16672
- "NumericBaseConfig": {
16673
- "additionalProperties": false,
16674
- "properties": {
16675
- "groupLength": {
16676
- "default": 0,
16677
- "description": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16678
- "format": "uint32",
16679
- "markdownDescription": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16680
- "minimum": 0,
16681
- "type": "integer"
16682
- },
16683
- "minimumDigits": {
16684
- "default": 0,
16685
- "description": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16686
- "format": "uint32",
16687
- "markdownDescription": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16688
- "minimum": 0,
16689
- "type": "integer"
16690
- },
16691
- "onlyIfContainsSeparator": {
16692
- "description": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16693
- "markdownDescription": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16694
- "type": "boolean"
16695
- }
16696
- },
16697
- "type": "object"
16698
- },
16699
16716
  "NumericNumberConfig": {
16700
16717
  "additionalProperties": false,
16701
16718
  "properties": {
@@ -16708,7 +16725,7 @@
16708
16725
  "type": "integer"
16709
16726
  },
16710
16727
  "groupLength": {
16711
- "default": 0,
16728
+ "default": 3,
16712
16729
  "description": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16713
16730
  "format": "uint32",
16714
16731
  "markdownDescription": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
@@ -16716,7 +16733,7 @@
16716
16733
  "type": "integer"
16717
16734
  },
16718
16735
  "minimumDigits": {
16719
- "default": 0,
16736
+ "default": 5,
16720
16737
  "description": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16721
16738
  "format": "uint32",
16722
16739
  "markdownDescription": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
@@ -16735,30 +16752,70 @@
16735
16752
  "additionalProperties": false,
16736
16753
  "properties": {
16737
16754
  "binary": {
16738
- "allOf": [
16739
- {
16740
- "$ref": "#/definitions/NumericBaseConfig"
16741
- }
16742
- ],
16755
+ "additionalProperties": false,
16743
16756
  "default": {
16744
16757
  "groupLength": 4,
16745
16758
  "minimumDigits": 0
16746
16759
  },
16747
16760
  "description": "Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).\nControls how digits are grouped and when separators are applied.",
16748
- "markdownDescription": "Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).\nControls how digits are grouped and when separators are applied."
16761
+ "markdownDescription": "Configuration for binary literals (e.g. `0b1010_0001` and bigint variants).\nControls how digits are grouped and when separators are applied.",
16762
+ "properties": {
16763
+ "groupLength": {
16764
+ "default": 4,
16765
+ "description": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16766
+ "format": "uint32",
16767
+ "markdownDescription": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16768
+ "minimum": 0,
16769
+ "type": "integer"
16770
+ },
16771
+ "minimumDigits": {
16772
+ "default": 0,
16773
+ "description": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16774
+ "format": "uint32",
16775
+ "markdownDescription": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16776
+ "minimum": 0,
16777
+ "type": "integer"
16778
+ },
16779
+ "onlyIfContainsSeparator": {
16780
+ "description": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16781
+ "markdownDescription": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16782
+ "type": "boolean"
16783
+ }
16784
+ },
16785
+ "type": "object"
16749
16786
  },
16750
16787
  "hexadecimal": {
16751
- "allOf": [
16752
- {
16753
- "$ref": "#/definitions/NumericBaseConfig"
16754
- }
16755
- ],
16788
+ "additionalProperties": false,
16756
16789
  "default": {
16757
16790
  "groupLength": 2,
16758
16791
  "minimumDigits": 0
16759
16792
  },
16760
16793
  "description": "Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).\nControls how digits are grouped and when separators are applied.",
16761
- "markdownDescription": "Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).\nControls how digits are grouped and when separators are applied."
16794
+ "markdownDescription": "Configuration for hexadecimal literals (e.g. `0xAB_CD`, `0Xab_cd`, and bigint variants).\nControls how digits are grouped and when separators are applied.",
16795
+ "properties": {
16796
+ "groupLength": {
16797
+ "default": 2,
16798
+ "description": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16799
+ "format": "uint32",
16800
+ "markdownDescription": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16801
+ "minimum": 0,
16802
+ "type": "integer"
16803
+ },
16804
+ "minimumDigits": {
16805
+ "default": 0,
16806
+ "description": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16807
+ "format": "uint32",
16808
+ "markdownDescription": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16809
+ "minimum": 0,
16810
+ "type": "integer"
16811
+ },
16812
+ "onlyIfContainsSeparator": {
16813
+ "description": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16814
+ "markdownDescription": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16815
+ "type": "boolean"
16816
+ }
16817
+ },
16818
+ "type": "object"
16762
16819
  },
16763
16820
  "number": {
16764
16821
  "allOf": [
@@ -16770,17 +16827,37 @@
16770
16827
  "markdownDescription": "Configuration for decimal numbers (integers, fraction parts, and exponents).\nControls how digits are grouped and when separators are applied."
16771
16828
  },
16772
16829
  "octal": {
16773
- "allOf": [
16774
- {
16775
- "$ref": "#/definitions/NumericBaseConfig"
16776
- }
16777
- ],
16830
+ "additionalProperties": false,
16778
16831
  "default": {
16779
16832
  "groupLength": 4,
16780
16833
  "minimumDigits": 0
16781
16834
  },
16782
16835
  "description": "Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).\nControls how digits are grouped and when separators are applied.",
16783
- "markdownDescription": "Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).\nControls how digits are grouped and when separators are applied."
16836
+ "markdownDescription": "Configuration for octal literals (e.g. `0o1234_5670` and bigint variants).\nControls how digits are grouped and when separators are applied.",
16837
+ "properties": {
16838
+ "groupLength": {
16839
+ "default": 4,
16840
+ "description": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16841
+ "format": "uint32",
16842
+ "markdownDescription": "The number of digits per group when inserting numeric separators.\nFor example, a `groupLength` of 3 formats `1234567` as `1_234_567`.",
16843
+ "minimum": 0,
16844
+ "type": "integer"
16845
+ },
16846
+ "minimumDigits": {
16847
+ "default": 0,
16848
+ "description": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16849
+ "format": "uint32",
16850
+ "markdownDescription": "The minimum number of digits required before grouping is applied.\nValues with fewer digits than this threshold will not be grouped.",
16851
+ "minimum": 0,
16852
+ "type": "integer"
16853
+ },
16854
+ "onlyIfContainsSeparator": {
16855
+ "description": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16856
+ "markdownDescription": "Only enforce the rule when the numeric literal already contains a separator (`_`).\n\nWhen `true`, numbers without separators are left as-is; when `false` (default),\ngrouping will be enforced for eligible numbers even if they don't include separators yet.",
16857
+ "type": "boolean"
16858
+ }
16859
+ },
16860
+ "type": "object"
16784
16861
  },
16785
16862
  "onlyIfContainsSeparator": {
16786
16863
  "default": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect/tsgo",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "type": "module",
5
5
  "description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
6
6
  "license": "MIT",
@@ -41,13 +41,13 @@
41
41
  "schema.json"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@effect/tsgo-win32-arm64": "0.41.0",
45
- "@effect/tsgo-win32-x64": "0.41.0",
46
- "@effect/tsgo-linux-x64": "0.41.0",
47
- "@effect/tsgo-linux-arm64": "0.41.0",
48
- "@effect/tsgo-linux-arm": "0.41.0",
49
- "@effect/tsgo-darwin-x64": "0.41.0",
50
- "@effect/tsgo-darwin-arm64": "0.41.0"
44
+ "@effect/tsgo-win32-x64": "0.42.0",
45
+ "@effect/tsgo-win32-arm64": "0.42.0",
46
+ "@effect/tsgo-linux-x64": "0.42.0",
47
+ "@effect/tsgo-linux-arm64": "0.42.0",
48
+ "@effect/tsgo-linux-arm": "0.42.0",
49
+ "@effect/tsgo-darwin-x64": "0.42.0",
50
+ "@effect/tsgo-darwin-arm64": "0.42.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@effect/platform-node": "^4.0.0-beta.107",
package/schema.json CHANGED
@@ -2312,6 +2312,11 @@
2312
2312
  "default": "off",
2313
2313
  "description": "Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow"
2314
2314
  },
2315
+ "catchAllTagDispatchToCatchTag": {
2316
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2317
+ "default": "suggestion",
2318
+ "description": "Suggests Effect.catchTag or Effect.catchTags for catch-all handlers that re-fail unmatched tagged errors"
2319
+ },
2315
2320
  "catchAllToMapError": {
2316
2321
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2317
2322
  "default": "suggestion",
@@ -2677,6 +2682,11 @@
2677
2682
  "default": "warning",
2678
2683
  "description": "Detects Promise types in Effect success channels where they are not awaited"
2679
2684
  },
2685
+ "provideLayerSucceedToProvideService": {
2686
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2687
+ "default": "suggestion",
2688
+ "description": "Suggests providing inline Layer.succeed and Layer.effect services directly"
2689
+ },
2680
2690
  "raceFirstWithSleepToTimeout": {
2681
2691
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2682
2692
  "default": "suggestion",
@@ -2707,6 +2717,11 @@
2707
2717
  "default": "suggestion",
2708
2718
  "description": "Suggests using Runtime or Effect.run*With methods instead of Effect.run* inside Effect contexts"
2709
2719
  },
2720
+ "runOfExitToRunExit": {
2721
+ "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2722
+ "default": "suggestion",
2723
+ "description": "Suggests using Effect.runPromiseExit instead of passing Effect.exit to Effect.runPromise"
2724
+ },
2710
2725
  "schemaLiteralNonFinite": {
2711
2726
  "$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
2712
2727
  "default": "error",