@effect/tsgo 0.43.0 → 0.45.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 +9 -5
- package/dist/effect-tsgo.cjs +83 -10
- package/oxlint-presets/correctness.json +2 -0
- package/oxlint-presets/effect-native.json +2 -1
- package/oxlint-presets/index.js +15 -1
- package/oxlint-presets/recommended.json +7 -0
- package/oxlint-presets/style.json +4 -0
- package/oxlint-schema.json +12 -0
- package/package.json +8 -8
- package/schema.json +32 -2
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
|
+
The following target package versions are supported by `@effect/tsgo@0.45.0`:
|
|
42
42
|
|
|
43
43
|
| Component | Supported versions |
|
|
44
44
|
|---|---|
|
|
45
|
-
| TypeScript | `7.0.2`, `7.1.0-dev.
|
|
46
|
-
| Oxlint | `1.
|
|
45
|
+
| TypeScript | `7.0.2`, `7.1.0-dev.20260909.1` |
|
|
46
|
+
| Oxlint | `1.81.0`, `1.82.0` |
|
|
47
47
|
| oxlint-tsgolint | `7.0.2001` |
|
|
48
48
|
<!-- supported-components:end -->
|
|
49
49
|
|
|
@@ -71,6 +71,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
71
71
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-return-yield-star.md"><code>missingReturnYieldStar</code></a></td><td>Suggests using return yield* for Effects that never succeed</td></tr>
|
|
72
72
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-star-in-yield-effect-gen.md"><code>missingStarInYieldEffectGen</code></a></td><td>Detects bare yield (without *) inside Effect generator scopes</td></tr>
|
|
73
73
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/non-object-effect-service-type.md"><code>nonObjectEffectServiceType</code></a></td><td>Ensures Effect.Service types are objects, not primitives</td></tr>
|
|
74
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/obsolete-match-import.md"><code>obsoleteMatchImport</code></a></td><td>Warns when importing @effect/match in projects targeting Effect v4, where Match is included directly in the effect package</td></tr>
|
|
75
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/obsolete-schema-import.md"><code>obsoleteSchemaImport</code></a></td><td>Warns when importing @effect/schema in projects targeting Effect v4, where Schema is included directly in the effect package</td></tr>
|
|
74
76
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/outdated-api.md"><code>outdatedApi</code></a></td><td>Detects usage of APIs that have been removed or renamed in Effect v4</td></tr>
|
|
75
77
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/overridden-schema-constructor.md"><code>overriddenSchemaConstructor</code></a></td><td>Prevents overriding constructors in Schema classes which breaks decoding behavior</td></tr>
|
|
76
78
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/promise-in-effect-success.md"><code>promiseInEffectSuccess</code></a></td><td>Detects Promise types in Effect success channels where they are not awaited</td></tr>
|
|
@@ -101,8 +103,8 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
101
103
|
<tr><td colspan="2"><strong>Effect-native</strong> <em>Prefer Effect-native APIs and abstractions when available.</em></td></tr>
|
|
102
104
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/abort-controller-in-effect.md"><code>abortControllerInEffect</code></a></td><td>Warns when manually constructing AbortController inside Effect generators instead of using Effect.abortSignal</td></tr>
|
|
103
105
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/async-function.md"><code>asyncFunction</code></a></td><td>Warns when declaring async functions and suggests using Effect values and Effect.gen for async control flow</td></tr>
|
|
104
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid.md"><code>cryptoRandomUUID</code></a></td><td>Warns when using crypto.randomUUID() outside Effect generators instead of the Effect
|
|
105
|
-
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid-in-effect.md"><code>cryptoRandomUUIDInEffect</code></a></td><td>Warns when using crypto.randomUUID() inside Effect generators instead of the Effect
|
|
106
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid.md"><code>cryptoRandomUUID</code></a></td><td>Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Crypto module</td></tr>
|
|
107
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/crypto-random-uuid-in-effect.md"><code>cryptoRandomUUIDInEffect</code></a></td><td>Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Crypto module</td></tr>
|
|
106
108
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/extends-native-error.md"><code>extendsNativeError</code></a></td><td>Warns when a class directly extends the native Error class</td></tr>
|
|
107
109
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-console.md"><code>globalConsole</code></a></td><td>Warns when using console methods outside Effect generators instead of Effect.log/Logger</td></tr>
|
|
108
110
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/global-console-in-effect.md"><code>globalConsoleInEffect</code></a></td><td>Warns when using console methods inside Effect generators instead of Effect.log/Logger</td></tr>
|
|
@@ -120,6 +122,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
120
122
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-over-json.md"><code>preferSchemaOverJson</code></a></td><td>Suggests using Effect Schema for JSON operations instead of JSON.parse/JSON.stringify</td></tr>
|
|
121
123
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env.md"><code>processEnv</code></a></td><td>Warns when reading process.env outside Effect generators instead of using Effect Config</td></tr>
|
|
122
124
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/process-env-in-effect.md"><code>processEnvInEffect</code></a></td><td>Warns when reading process.env inside Effect generators instead of using Effect Config</td></tr>
|
|
125
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/schema-sync.md"><code>schemaSync</code></a></td><td>Suggests Effect-based Schema decoding and encoding instead of synchronous methods</td></tr>
|
|
123
126
|
<tr><td colspan="2"><strong>Style</strong> <em>Cleanup, consistency, and idiomatic Effect code.</em></td></tr>
|
|
124
127
|
<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's disposal protocol</td></tr>
|
|
125
128
|
<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>
|
|
@@ -164,6 +167,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
164
167
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/service-not-as-class.md"><code>serviceNotAsClass</code></a></td><td>Warns when Context.Service is used as a variable instead of a class declaration</td></tr>
|
|
165
168
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/strict-boolean-expressions.md"><code>strictBooleanExpressions</code></a></td><td>Enforces boolean types in conditional expressions for type safety</td></tr>
|
|
166
169
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/sync-to-succeed.md"><code>syncToSucceed</code></a></td><td>Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value</td></tr>
|
|
170
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/timeout-catch-tag-to-timeout-or-else.md"><code>timeoutCatchTagToTimeoutOrElse</code></a></td><td>Suggests dedicated timeout combinators instead of catching TimeoutError immediately after Effect.timeout</td></tr>
|
|
167
171
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-arrow-block.md"><code>unnecessaryArrowBlock</code></a></td><td>Suggests using a concise arrow body when the block only returns an expression</td></tr>
|
|
168
172
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-effect-gen.md"><code>unnecessaryEffectGen</code></a></td><td>Suggests removing Effect.gen when it contains only a single return statement</td></tr>
|
|
169
173
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/unnecessary-fail-yieldable-error.md"><code>unnecessaryFailYieldableError</code></a></td><td>Suggests yielding yieldable errors directly instead of wrapping with Effect.fail</td></tr>
|
package/dist/effect-tsgo.cjs
CHANGED
|
@@ -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.
|
|
48903
|
+
var version = "0.45.0";
|
|
48904
48904
|
|
|
48905
48905
|
//#endregion
|
|
48906
48906
|
//#region src/metadata.json
|
|
@@ -48950,7 +48950,8 @@ var presets$1 = [{
|
|
|
48950
48950
|
"nodeBuiltinImport": "warning",
|
|
48951
48951
|
"preferSchemaOverJson": "warning",
|
|
48952
48952
|
"processEnv": "warning",
|
|
48953
|
-
"processEnvInEffect": "warning"
|
|
48953
|
+
"processEnvInEffect": "warning",
|
|
48954
|
+
"schemaSync": "warning"
|
|
48954
48955
|
}
|
|
48955
48956
|
}];
|
|
48956
48957
|
var rules = [
|
|
@@ -49183,6 +49184,40 @@ var rules = [
|
|
|
49183
49184
|
}]
|
|
49184
49185
|
}
|
|
49185
49186
|
},
|
|
49187
|
+
{
|
|
49188
|
+
"name": "obsoleteMatchImport",
|
|
49189
|
+
"group": "correctness",
|
|
49190
|
+
"description": "Warns when importing @effect/match in projects targeting Effect v4, where Match is included directly in the effect package",
|
|
49191
|
+
"defaultSeverity": "warning",
|
|
49192
|
+
"fixable": false,
|
|
49193
|
+
"supportedEffect": ["v4"],
|
|
49194
|
+
"codes": [377129],
|
|
49195
|
+
"preview": {
|
|
49196
|
+
"sourceText": "import { Effect } from \"effect\"\n// @ts-expect-error - @effect/match is obsolete in v4\nimport * as Match from \"@effect/match\"\n\nexport const preview = Effect.sync(() => Match)\n",
|
|
49197
|
+
"diagnostics": [{
|
|
49198
|
+
"start": 109,
|
|
49199
|
+
"end": 124,
|
|
49200
|
+
"text": "This module reference imports `@effect/match`, which is obsolete in Effect v4. In Effect v4, pattern matching is provided directly by `Match` from `effect` (or `effect/Match`). effect(obsoleteMatchImport)"
|
|
49201
|
+
}]
|
|
49202
|
+
}
|
|
49203
|
+
},
|
|
49204
|
+
{
|
|
49205
|
+
"name": "obsoleteSchemaImport",
|
|
49206
|
+
"group": "correctness",
|
|
49207
|
+
"description": "Warns when importing @effect/schema in projects targeting Effect v4, where Schema is included directly in the effect package",
|
|
49208
|
+
"defaultSeverity": "warning",
|
|
49209
|
+
"fixable": false,
|
|
49210
|
+
"supportedEffect": ["v4"],
|
|
49211
|
+
"codes": [377128],
|
|
49212
|
+
"preview": {
|
|
49213
|
+
"sourceText": "import { Effect } from \"effect\"\n// @ts-expect-error - @effect/schema is obsolete in v4\nimport * as S from \"@effect/schema/Schema\"\n\nexport const preview = Effect.sync(() => S)\n",
|
|
49214
|
+
"diagnostics": [{
|
|
49215
|
+
"start": 106,
|
|
49216
|
+
"end": 129,
|
|
49217
|
+
"text": "This module reference imports `@effect/schema/Schema`, which is obsolete in Effect v4. In Effect v4, Schema is provided directly by `Schema` from `effect` (or `effect/Schema`). effect(obsoleteSchemaImport)"
|
|
49218
|
+
}]
|
|
49219
|
+
}
|
|
49220
|
+
},
|
|
49186
49221
|
{
|
|
49187
49222
|
"name": "outdatedApi",
|
|
49188
49223
|
"group": "correctness",
|
|
@@ -49678,7 +49713,7 @@ var rules = [
|
|
|
49678
49713
|
{
|
|
49679
49714
|
"name": "cryptoRandomUUID",
|
|
49680
49715
|
"group": "effectNative",
|
|
49681
|
-
"description": "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect
|
|
49716
|
+
"description": "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Crypto module",
|
|
49682
49717
|
"defaultSeverity": "off",
|
|
49683
49718
|
"fixable": false,
|
|
49684
49719
|
"supportedEffect": ["v4"],
|
|
@@ -49688,14 +49723,14 @@ var rules = [
|
|
|
49688
49723
|
"diagnostics": [{
|
|
49689
49724
|
"start": 24,
|
|
49690
49725
|
"end": 43,
|
|
49691
|
-
"text": "This code uses `crypto.randomUUID()`, prefer the Effect `
|
|
49726
|
+
"text": "This code uses `crypto.randomUUID()`, prefer the Effect `Crypto` module instead. effect(cryptoRandomUUID)"
|
|
49692
49727
|
}]
|
|
49693
49728
|
}
|
|
49694
49729
|
},
|
|
49695
49730
|
{
|
|
49696
49731
|
"name": "cryptoRandomUUIDInEffect",
|
|
49697
49732
|
"group": "effectNative",
|
|
49698
|
-
"description": "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect
|
|
49733
|
+
"description": "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Crypto module",
|
|
49699
49734
|
"defaultSeverity": "off",
|
|
49700
49735
|
"fixable": false,
|
|
49701
49736
|
"supportedEffect": ["v4"],
|
|
@@ -49705,7 +49740,7 @@ var rules = [
|
|
|
49705
49740
|
"diagnostics": [{
|
|
49706
49741
|
"start": 90,
|
|
49707
49742
|
"end": 109,
|
|
49708
|
-
"text": "This Effect code uses `crypto.randomUUID()`, prefer the Effect `
|
|
49743
|
+
"text": "This Effect code uses `crypto.randomUUID()`, prefer the Effect `Crypto` module instead. effect(cryptoRandomUUIDInEffect)"
|
|
49709
49744
|
}]
|
|
49710
49745
|
}
|
|
49711
49746
|
},
|
|
@@ -50002,6 +50037,23 @@ var rules = [
|
|
|
50002
50037
|
}]
|
|
50003
50038
|
}
|
|
50004
50039
|
},
|
|
50040
|
+
{
|
|
50041
|
+
"name": "schemaSync",
|
|
50042
|
+
"group": "effectNative",
|
|
50043
|
+
"description": "Suggests Effect-based Schema decoding and encoding instead of synchronous methods",
|
|
50044
|
+
"defaultSeverity": "off",
|
|
50045
|
+
"fixable": false,
|
|
50046
|
+
"supportedEffect": ["v3", "v4"],
|
|
50047
|
+
"codes": [377130],
|
|
50048
|
+
"preview": {
|
|
50049
|
+
"sourceText": "import * as Schema from \"effect/Schema\"\n\nconst Person = Schema.Struct({ name: Schema.String })\n\nexport const person = Schema.decodeUnknownSync(Person)({ name: \"Ada\" })\n",
|
|
50050
|
+
"diagnostics": [{
|
|
50051
|
+
"start": 118,
|
|
50052
|
+
"end": 142,
|
|
50053
|
+
"text": "`Schema.decodeUnknownSync` executes synchronously. Use `Schema.decodeUnknownEffect` to compose this operation through Effect without throwing. effect(schemaSync)"
|
|
50054
|
+
}]
|
|
50055
|
+
}
|
|
50056
|
+
},
|
|
50005
50057
|
{
|
|
50006
50058
|
"name": "acquireReleaseDisposable",
|
|
50007
50059
|
"group": "style",
|
|
@@ -50757,6 +50809,27 @@ var rules = [
|
|
|
50757
50809
|
}]
|
|
50758
50810
|
}
|
|
50759
50811
|
},
|
|
50812
|
+
{
|
|
50813
|
+
"name": "timeoutCatchTagToTimeoutOrElse",
|
|
50814
|
+
"group": "style",
|
|
50815
|
+
"description": "Suggests dedicated timeout combinators instead of catching TimeoutError immediately after Effect.timeout",
|
|
50816
|
+
"defaultSeverity": "suggestion",
|
|
50817
|
+
"fixable": true,
|
|
50818
|
+
"supportedEffect": ["v4"],
|
|
50819
|
+
"codes": [377127],
|
|
50820
|
+
"preview": {
|
|
50821
|
+
"sourceText": "import { Effect } from \"effect\"\n\ndeclare const fetchQuote: Effect.Effect<string>\n\nexport const quote = fetchQuote.pipe(\n Effect.timeout(\"5 seconds\"),\n Effect.catchTag(\"TimeoutError\", () => Effect.succeed(\"cached quote\"))\n)\n\nexport const maybeQuote = fetchQuote.pipe(\n Effect.timeout(\"5 seconds\"),\n Effect.asSome,\n Effect.catchTag(\"TimeoutError\", () => Effect.succeedNone)\n)\n",
|
|
50822
|
+
"diagnostics": [{
|
|
50823
|
+
"start": 153,
|
|
50824
|
+
"end": 168,
|
|
50825
|
+
"text": "Use `Effect.timeoutOrElse` to handle this timeout directly. effect(timeoutCatchTagToTimeoutOrElse)"
|
|
50826
|
+
}, {
|
|
50827
|
+
"start": 319,
|
|
50828
|
+
"end": 334,
|
|
50829
|
+
"text": "Use `Effect.timeoutOption` to handle this timeout directly. effect(timeoutCatchTagToTimeoutOrElse)"
|
|
50830
|
+
}]
|
|
50831
|
+
}
|
|
50832
|
+
},
|
|
50760
50833
|
{
|
|
50761
50834
|
"name": "unnecessaryArrowBlock",
|
|
50762
50835
|
"group": "style",
|
|
@@ -50871,7 +50944,7 @@ var metadata_default = {
|
|
|
50871
50944
|
var tags = {
|
|
50872
50945
|
"typescript": {
|
|
50873
50946
|
"latest": "7.0.2",
|
|
50874
|
-
"next": "7.1.0-dev.
|
|
50947
|
+
"next": "7.1.0-dev.20260909.1"
|
|
50875
50948
|
},
|
|
50876
50949
|
"oxlint": { "latest": "1.82.0" },
|
|
50877
50950
|
"oxlint-tsgolint": { "latest": "7.0.2001" }
|
|
@@ -50882,8 +50955,8 @@ var components = {
|
|
|
50882
50955
|
"gitHead": "2bd066d87f5bafd315be9f40889d0a60b9e58e0b",
|
|
50883
50956
|
"provider": "typescript-go"
|
|
50884
50957
|
},
|
|
50885
|
-
"7.1.0-dev.
|
|
50886
|
-
"gitHead": "
|
|
50958
|
+
"7.1.0-dev.20260909.1": {
|
|
50959
|
+
"gitHead": "f3b04fe05642d53b4ff126a4af05fe2587b43748",
|
|
50887
50960
|
"provider": "typescript"
|
|
50888
50961
|
}
|
|
50889
50962
|
},
|
|
@@ -50892,7 +50965,7 @@ var components = {
|
|
|
50892
50965
|
"dependencies": { "typescript": "7.0.2" }
|
|
50893
50966
|
} },
|
|
50894
50967
|
"oxlint": {
|
|
50895
|
-
"1.
|
|
50968
|
+
"1.81.0": { "gitHead": "0b4e2e67f4193e7ebfcc64982275eb583ae82c83" },
|
|
50896
50969
|
"1.82.0": { "gitHead": "b4da00b621ec2f6f67ed218f5366c45ed325331b" }
|
|
50897
50970
|
}
|
|
50898
50971
|
};
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"effecttsgo/missing-return-yield-star": "warn",
|
|
20
20
|
"effecttsgo/missing-star-in-yield-effect-gen": "warn",
|
|
21
21
|
"effecttsgo/non-object-effect-service-type": "warn",
|
|
22
|
+
"effecttsgo/obsolete-match-import": "warn",
|
|
23
|
+
"effecttsgo/obsolete-schema-import": "warn",
|
|
22
24
|
"effecttsgo/outdated-api": "warn",
|
|
23
25
|
"effecttsgo/overridden-schema-constructor": "warn",
|
|
24
26
|
"effecttsgo/promise-in-effect-success": "warn",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"effecttsgo/node-builtin-import": "warn",
|
|
27
27
|
"effecttsgo/prefer-schema-over-json": "warn",
|
|
28
28
|
"effecttsgo/process-env": "warn",
|
|
29
|
-
"effecttsgo/process-env-in-effect": "warn"
|
|
29
|
+
"effecttsgo/process-env-in-effect": "warn",
|
|
30
|
+
"effecttsgo/schema-sync": "warn"
|
|
30
31
|
}
|
|
31
32
|
}
|
package/oxlint-presets/index.js
CHANGED
|
@@ -52,6 +52,8 @@ export const correctness = {
|
|
|
52
52
|
"effecttsgo/missing-return-yield-star": "warn",
|
|
53
53
|
"effecttsgo/missing-star-in-yield-effect-gen": "warn",
|
|
54
54
|
"effecttsgo/non-object-effect-service-type": "warn",
|
|
55
|
+
"effecttsgo/obsolete-match-import": "warn",
|
|
56
|
+
"effecttsgo/obsolete-schema-import": "warn",
|
|
55
57
|
"effecttsgo/outdated-api": "warn",
|
|
56
58
|
"effecttsgo/overridden-schema-constructor": "warn",
|
|
57
59
|
"effecttsgo/promise-in-effect-success": "warn",
|
|
@@ -89,7 +91,8 @@ export const effectNative = {
|
|
|
89
91
|
"effecttsgo/node-builtin-import": "warn",
|
|
90
92
|
"effecttsgo/prefer-schema-over-json": "warn",
|
|
91
93
|
"effecttsgo/process-env": "warn",
|
|
92
|
-
"effecttsgo/process-env-in-effect": "warn"
|
|
94
|
+
"effecttsgo/process-env-in-effect": "warn",
|
|
95
|
+
"effecttsgo/schema-sync": "warn"
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
|
|
@@ -151,6 +154,8 @@ export const recommended = {
|
|
|
151
154
|
"effecttsgo/lazy-promise-in-effect-sync": "warn",
|
|
152
155
|
"effecttsgo/leaking-requirements": "warn",
|
|
153
156
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
157
|
+
"effecttsgo/match-effect-to-map-both": "warn",
|
|
158
|
+
"effecttsgo/match-effect-to-match": "warn",
|
|
154
159
|
"effecttsgo/missing-effect-context": "error",
|
|
155
160
|
"effecttsgo/missing-effect-error": "error",
|
|
156
161
|
"effecttsgo/missing-layer-context": "error",
|
|
@@ -161,6 +166,8 @@ export const recommended = {
|
|
|
161
166
|
"effecttsgo/new-promise": "warn",
|
|
162
167
|
"effecttsgo/node-builtin-import": "warn",
|
|
163
168
|
"effecttsgo/non-object-effect-service-type": "error",
|
|
169
|
+
"effecttsgo/obsolete-match-import": "warn",
|
|
170
|
+
"effecttsgo/obsolete-schema-import": "warn",
|
|
164
171
|
"effecttsgo/option-match-to-from-option": "warn",
|
|
165
172
|
"effecttsgo/outdated-api": "warn",
|
|
166
173
|
"effecttsgo/overridden-schema-constructor": "error",
|
|
@@ -171,6 +178,7 @@ export const recommended = {
|
|
|
171
178
|
"effecttsgo/process-env": "warn",
|
|
172
179
|
"effecttsgo/process-env-in-effect": "warn",
|
|
173
180
|
"effecttsgo/promise-in-effect-success": "warn",
|
|
181
|
+
"effecttsgo/provide-layer-succeed-to-provide-service": "warn",
|
|
174
182
|
"effecttsgo/race-first-with-sleep-to-timeout": "warn",
|
|
175
183
|
"effecttsgo/redundant-map-error": "warn",
|
|
176
184
|
"effecttsgo/redundant-or-die": "warn",
|
|
@@ -182,9 +190,11 @@ export const recommended = {
|
|
|
182
190
|
"effecttsgo/schema-number": "warn",
|
|
183
191
|
"effecttsgo/schema-opaque-instance-member": "error",
|
|
184
192
|
"effecttsgo/schema-struct-with-tag": "warn",
|
|
193
|
+
"effecttsgo/schema-sync": "warn",
|
|
185
194
|
"effecttsgo/schema-sync-in-effect": "warn",
|
|
186
195
|
"effecttsgo/scope-in-layer-effect": "warn",
|
|
187
196
|
"effecttsgo/sync-to-succeed": "warn",
|
|
197
|
+
"effecttsgo/timeout-catch-tag-to-timeout-or-else": "warn",
|
|
188
198
|
"effecttsgo/try-catch-in-effect-gen": "warn",
|
|
189
199
|
"effecttsgo/unknown-in-effect-catch": "warn",
|
|
190
200
|
"effecttsgo/unnecessary-effect-gen": "warn",
|
|
@@ -222,6 +232,8 @@ export const style = {
|
|
|
222
232
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
223
233
|
"effecttsgo/flat-map-to-map": "warn",
|
|
224
234
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
235
|
+
"effecttsgo/match-effect-to-map-both": "warn",
|
|
236
|
+
"effecttsgo/match-effect-to-match": "warn",
|
|
225
237
|
"effecttsgo/missed-pipeable-opportunity": "warn",
|
|
226
238
|
"effecttsgo/missing-effect-service-dependency": "warn",
|
|
227
239
|
"effecttsgo/missing-pipeable-signature": "warn",
|
|
@@ -232,6 +244,7 @@ export const style = {
|
|
|
232
244
|
"effecttsgo/prefer-schema-type-property": "warn",
|
|
233
245
|
"effecttsgo/prefer-succeed-some-or-none": "warn",
|
|
234
246
|
"effecttsgo/prefer-typed-schema-decoder": "warn",
|
|
247
|
+
"effecttsgo/provide-layer-succeed-to-provide-service": "warn",
|
|
235
248
|
"effecttsgo/race-first-with-sleep-to-timeout": "warn",
|
|
236
249
|
"effecttsgo/redundant-map-error": "warn",
|
|
237
250
|
"effecttsgo/redundant-or-die": "warn",
|
|
@@ -243,6 +256,7 @@ export const style = {
|
|
|
243
256
|
"effecttsgo/service-not-as-class": "warn",
|
|
244
257
|
"effecttsgo/strict-boolean-expressions": "warn",
|
|
245
258
|
"effecttsgo/sync-to-succeed": "warn",
|
|
259
|
+
"effecttsgo/timeout-catch-tag-to-timeout-or-else": "warn",
|
|
246
260
|
"effecttsgo/unnecessary-arrow-block": "warn",
|
|
247
261
|
"effecttsgo/unnecessary-effect-gen": "warn",
|
|
248
262
|
"effecttsgo/unnecessary-fail-yieldable-error": "warn",
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
"effecttsgo/lazy-promise-in-effect-sync": "warn",
|
|
57
57
|
"effecttsgo/leaking-requirements": "warn",
|
|
58
58
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
59
|
+
"effecttsgo/match-effect-to-map-both": "warn",
|
|
60
|
+
"effecttsgo/match-effect-to-match": "warn",
|
|
59
61
|
"effecttsgo/missing-effect-context": "error",
|
|
60
62
|
"effecttsgo/missing-effect-error": "error",
|
|
61
63
|
"effecttsgo/missing-layer-context": "error",
|
|
@@ -66,6 +68,8 @@
|
|
|
66
68
|
"effecttsgo/new-promise": "warn",
|
|
67
69
|
"effecttsgo/node-builtin-import": "warn",
|
|
68
70
|
"effecttsgo/non-object-effect-service-type": "error",
|
|
71
|
+
"effecttsgo/obsolete-match-import": "warn",
|
|
72
|
+
"effecttsgo/obsolete-schema-import": "warn",
|
|
69
73
|
"effecttsgo/option-match-to-from-option": "warn",
|
|
70
74
|
"effecttsgo/outdated-api": "warn",
|
|
71
75
|
"effecttsgo/overridden-schema-constructor": "error",
|
|
@@ -76,6 +80,7 @@
|
|
|
76
80
|
"effecttsgo/process-env": "warn",
|
|
77
81
|
"effecttsgo/process-env-in-effect": "warn",
|
|
78
82
|
"effecttsgo/promise-in-effect-success": "warn",
|
|
83
|
+
"effecttsgo/provide-layer-succeed-to-provide-service": "warn",
|
|
79
84
|
"effecttsgo/race-first-with-sleep-to-timeout": "warn",
|
|
80
85
|
"effecttsgo/redundant-map-error": "warn",
|
|
81
86
|
"effecttsgo/redundant-or-die": "warn",
|
|
@@ -87,9 +92,11 @@
|
|
|
87
92
|
"effecttsgo/schema-number": "warn",
|
|
88
93
|
"effecttsgo/schema-opaque-instance-member": "error",
|
|
89
94
|
"effecttsgo/schema-struct-with-tag": "warn",
|
|
95
|
+
"effecttsgo/schema-sync": "warn",
|
|
90
96
|
"effecttsgo/schema-sync-in-effect": "warn",
|
|
91
97
|
"effecttsgo/scope-in-layer-effect": "warn",
|
|
92
98
|
"effecttsgo/sync-to-succeed": "warn",
|
|
99
|
+
"effecttsgo/timeout-catch-tag-to-timeout-or-else": "warn",
|
|
93
100
|
"effecttsgo/try-catch-in-effect-gen": "warn",
|
|
94
101
|
"effecttsgo/unknown-in-effect-catch": "warn",
|
|
95
102
|
"effecttsgo/unnecessary-effect-gen": "warn",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
26
26
|
"effecttsgo/flat-map-to-map": "warn",
|
|
27
27
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
28
|
+
"effecttsgo/match-effect-to-map-both": "warn",
|
|
29
|
+
"effecttsgo/match-effect-to-match": "warn",
|
|
28
30
|
"effecttsgo/missed-pipeable-opportunity": "warn",
|
|
29
31
|
"effecttsgo/missing-effect-service-dependency": "warn",
|
|
30
32
|
"effecttsgo/missing-pipeable-signature": "warn",
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
"effecttsgo/prefer-schema-type-property": "warn",
|
|
36
38
|
"effecttsgo/prefer-succeed-some-or-none": "warn",
|
|
37
39
|
"effecttsgo/prefer-typed-schema-decoder": "warn",
|
|
40
|
+
"effecttsgo/provide-layer-succeed-to-provide-service": "warn",
|
|
38
41
|
"effecttsgo/race-first-with-sleep-to-timeout": "warn",
|
|
39
42
|
"effecttsgo/redundant-map-error": "warn",
|
|
40
43
|
"effecttsgo/redundant-or-die": "warn",
|
|
@@ -46,6 +49,7 @@
|
|
|
46
49
|
"effecttsgo/service-not-as-class": "warn",
|
|
47
50
|
"effecttsgo/strict-boolean-expressions": "warn",
|
|
48
51
|
"effecttsgo/sync-to-succeed": "warn",
|
|
52
|
+
"effecttsgo/timeout-catch-tag-to-timeout-or-else": "warn",
|
|
49
53
|
"effecttsgo/unnecessary-arrow-block": "warn",
|
|
50
54
|
"effecttsgo/unnecessary-effect-gen": "warn",
|
|
51
55
|
"effecttsgo/unnecessary-fail-yieldable-error": "warn",
|
package/oxlint-schema.json
CHANGED
|
@@ -2443,6 +2443,12 @@
|
|
|
2443
2443
|
"effecttsgo/non-object-effect-service-type": {
|
|
2444
2444
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2445
2445
|
},
|
|
2446
|
+
"effecttsgo/obsolete-match-import": {
|
|
2447
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2448
|
+
},
|
|
2449
|
+
"effecttsgo/obsolete-schema-import": {
|
|
2450
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2451
|
+
},
|
|
2446
2452
|
"effecttsgo/option-match-to-from-option": {
|
|
2447
2453
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2448
2454
|
},
|
|
@@ -2512,6 +2518,9 @@
|
|
|
2512
2518
|
"effecttsgo/schema-struct-with-tag": {
|
|
2513
2519
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2514
2520
|
},
|
|
2521
|
+
"effecttsgo/schema-sync": {
|
|
2522
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2523
|
+
},
|
|
2515
2524
|
"effecttsgo/schema-sync-in-effect": {
|
|
2516
2525
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2517
2526
|
},
|
|
@@ -2533,6 +2542,9 @@
|
|
|
2533
2542
|
"effecttsgo/sync-to-succeed": {
|
|
2534
2543
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2535
2544
|
},
|
|
2545
|
+
"effecttsgo/timeout-catch-tag-to-timeout-or-else": {
|
|
2546
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2547
|
+
},
|
|
2536
2548
|
"effecttsgo/try-catch-in-effect-gen": {
|
|
2537
2549
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2538
2550
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.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-x64": "0.
|
|
45
|
-
"@effect/tsgo-win32-arm64": "0.
|
|
46
|
-
"@effect/tsgo-linux-x64": "0.
|
|
47
|
-
"@effect/tsgo-linux-arm64": "0.
|
|
48
|
-
"@effect/tsgo-linux-arm": "0.
|
|
49
|
-
"@effect/tsgo-darwin-x64": "0.
|
|
50
|
-
"@effect/tsgo-darwin-arm64": "0.
|
|
44
|
+
"@effect/tsgo-win32-x64": "0.45.0",
|
|
45
|
+
"@effect/tsgo-win32-arm64": "0.45.0",
|
|
46
|
+
"@effect/tsgo-linux-x64": "0.45.0",
|
|
47
|
+
"@effect/tsgo-linux-arm64": "0.45.0",
|
|
48
|
+
"@effect/tsgo-linux-arm": "0.45.0",
|
|
49
|
+
"@effect/tsgo-darwin-x64": "0.45.0",
|
|
50
|
+
"@effect/tsgo-darwin-arm64": "0.45.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@effect/platform-node": "^4.0.0-beta.107",
|
package/schema.json
CHANGED
|
@@ -2365,12 +2365,12 @@
|
|
|
2365
2365
|
"cryptoRandomUUID": {
|
|
2366
2366
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2367
2367
|
"default": "off",
|
|
2368
|
-
"description": "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect
|
|
2368
|
+
"description": "Warns when using crypto.randomUUID() outside Effect generators instead of the Effect Crypto module"
|
|
2369
2369
|
},
|
|
2370
2370
|
"cryptoRandomUUIDInEffect": {
|
|
2371
2371
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2372
2372
|
"default": "off",
|
|
2373
|
-
"description": "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect
|
|
2373
|
+
"description": "Warns when using crypto.randomUUID() inside Effect generators instead of the Effect Crypto module"
|
|
2374
2374
|
},
|
|
2375
2375
|
"deterministicKeys": {
|
|
2376
2376
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
@@ -2552,6 +2552,16 @@
|
|
|
2552
2552
|
"default": "suggestion",
|
|
2553
2553
|
"description": "Suggests using Effect.asSome instead of Effect.map when the mapper only wraps the success value with Option.some"
|
|
2554
2554
|
},
|
|
2555
|
+
"matchEffectToMapBoth": {
|
|
2556
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2557
|
+
"default": "suggestion",
|
|
2558
|
+
"description": "Suggests Effect.mapBoth when Effect.matchEffect only transforms the failure and success channels"
|
|
2559
|
+
},
|
|
2560
|
+
"matchEffectToMatch": {
|
|
2561
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2562
|
+
"default": "suggestion",
|
|
2563
|
+
"description": "Suggests Effect.match or Effect.matchCause when both Effect.matchEffect handlers only return Effect.succeed"
|
|
2564
|
+
},
|
|
2555
2565
|
"missedPipeableOpportunity": {
|
|
2556
2566
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2557
2567
|
"default": "off",
|
|
@@ -2627,6 +2637,16 @@
|
|
|
2627
2637
|
"default": "error",
|
|
2628
2638
|
"description": "Ensures Effect.Service types are objects, not primitives"
|
|
2629
2639
|
},
|
|
2640
|
+
"obsoleteMatchImport": {
|
|
2641
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2642
|
+
"default": "warning",
|
|
2643
|
+
"description": "Warns when importing @effect/match in projects targeting Effect v4, where Match is included directly in the effect package"
|
|
2644
|
+
},
|
|
2645
|
+
"obsoleteSchemaImport": {
|
|
2646
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2647
|
+
"default": "warning",
|
|
2648
|
+
"description": "Warns when importing @effect/schema in projects targeting Effect v4, where Schema is included directly in the effect package"
|
|
2649
|
+
},
|
|
2630
2650
|
"optionMatchToFromOption": {
|
|
2631
2651
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2632
2652
|
"default": "suggestion",
|
|
@@ -2742,6 +2762,11 @@
|
|
|
2742
2762
|
"default": "suggestion",
|
|
2743
2763
|
"description": "Suggests using Schema.TaggedStruct instead of Schema.Struct with _tag field"
|
|
2744
2764
|
},
|
|
2765
|
+
"schemaSync": {
|
|
2766
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2767
|
+
"default": "off",
|
|
2768
|
+
"description": "Suggests Effect-based Schema decoding and encoding instead of synchronous methods"
|
|
2769
|
+
},
|
|
2745
2770
|
"schemaSyncInEffect": {
|
|
2746
2771
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2747
2772
|
"default": "suggestion",
|
|
@@ -2777,6 +2802,11 @@
|
|
|
2777
2802
|
"default": "suggestion",
|
|
2778
2803
|
"description": "Suggests using Effect.succeed instead of Effect.sync when the thunk returns a constant value"
|
|
2779
2804
|
},
|
|
2805
|
+
"timeoutCatchTagToTimeoutOrElse": {
|
|
2806
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2807
|
+
"default": "suggestion",
|
|
2808
|
+
"description": "Suggests dedicated timeout combinators instead of catching TimeoutError immediately after Effect.timeout"
|
|
2809
|
+
},
|
|
2780
2810
|
"tryCatchInEffectGen": {
|
|
2781
2811
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2782
2812
|
"default": "suggestion",
|