@effect/tsgo 0.68.1 → 0.70.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 +8 -5
- package/dist/effect-tsgo.cjs +75 -12
- package/oxlint-presets/index.js +5 -0
- package/oxlint-presets/recommended.json +1 -0
- package/oxlint-presets/strict.json +1 -0
- package/oxlint-presets/style.json +3 -0
- package/oxlint-schema.json +56 -9
- package/package.json +8 -8
- package/schema.json +15 -0
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@ A wrapper for both [TSRS](https://github.com/oxc-project/tsrs) and [TypeScript-G
|
|
|
5
5
|
<!-- supported-components:start -->
|
|
6
6
|
## Supported Package Versions
|
|
7
7
|
|
|
8
|
-
The following target package versions are supported by `@effect/tsgo@0.
|
|
8
|
+
The following target package versions are supported by `@effect/tsgo@0.70.0`:
|
|
9
9
|
|
|
10
10
|
| Component | Supported versions |
|
|
11
11
|
|---|---|
|
|
12
|
-
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.
|
|
13
|
-
| tsrs | `0.
|
|
14
|
-
| Oxlint | `1.91.0`, `1.92.0`, `1.93.0` |
|
|
15
|
-
| oxlint-tsgolint | `7.0.2005`, `7.0.2006` |
|
|
12
|
+
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261116.1` |
|
|
13
|
+
| tsrs | `0.25.0-ts7.1.0-beta` |
|
|
14
|
+
| Oxlint | `1.91.0`, `1.92.0`, `1.93.0`, `1.94.0` |
|
|
15
|
+
| oxlint-tsgolint | `7.0.2005`, `7.0.2006`, `7.0.2007` |
|
|
16
16
|
<!-- supported-components:end -->
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
@@ -185,8 +185,10 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
185
185
|
<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>
|
|
186
186
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-identity-to-flatten.md"><code>flatMapIdentityToFlatten</code></a></td><td>Suggests Effect.flatten instead of Effect.flatMap when the callback is Effect's identity export referenced directly or an unannotated function returning its parameter</td></tr>
|
|
187
187
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-ignored-param-to-and-then.md"><code>flatMapIgnoredParamToAndThen</code></a></td><td>Suggests using Effect.andThen instead of Effect.flatMap when a zero-parameter callback returns an existing Effect value</td></tr>
|
|
188
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-provide-service-to-provide-service-effect.md"><code>flatMapProvideServiceToProvideServiceEffect</code></a></td><td>Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService</td></tr>
|
|
188
189
|
<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>
|
|
189
190
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/flat-map-to-tap.md"><code>flatMapToTap</code></a></td><td>Suggests Effect.tap when a flatMap or andThen callback runs an effect and returns its unchanged parameter</td></tr>
|
|
191
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/for-loop-push-to-for-each.md"><code>forLoopPushToForEach</code></a></td><td>Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator</td></tr>
|
|
190
192
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/manual-metric-tap-to-track.md"><code>manualMetricTapToTrack</code></a></td><td>Suggests Effect.trackSuccesses/trackErrors/trackDefects when an Effect.tap/tapError/tapDefect only updates a metric</td></tr>
|
|
191
193
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-const-to-as.md"><code>mapConstToAs</code></a></td><td>Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant</td></tr>
|
|
192
194
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/map-map-error-to-map-both.md"><code>mapMapErrorToMapBoth</code></a></td><td>Suggests Effect.mapBoth when Effect.map and Effect.mapError are adjacent steps of a piping flow</td></tr>
|
|
@@ -197,6 +199,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
197
199
|
<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>
|
|
198
200
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/match-to-result-or-option.md"><code>matchToResultOrOption</code></a></td><td>Suggests Effect.result, Effect.option or Effect.either when match handlers, or a map step followed by a catch step, only reify the outcome</td></tr>
|
|
199
201
|
<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>
|
|
202
|
+
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/missing-concurrency-option.md"><code>missingConcurrencyOption</code></a></td><td>Reports Effect.all and Effect.forEach calls without an explicit concurrency option, which run sequentially by default</td></tr>
|
|
200
203
|
<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>
|
|
201
204
|
<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>
|
|
202
205
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/multiple-catch-tag.md"><code>multipleCatchTag</code></a></td><td>Suggests collapsing consecutive Effect.catchTag transformations into a single Effect.catchTags call when semantics stay equivalent</td></tr>
|
package/dist/effect-tsgo.cjs
CHANGED
|
@@ -57911,7 +57911,7 @@ const runWith = (command, config) => {
|
|
|
57911
57911
|
//#endregion
|
|
57912
57912
|
//#region package.json
|
|
57913
57913
|
var name = "@effect/tsgo";
|
|
57914
|
-
var version = "0.
|
|
57914
|
+
var version = "0.70.0";
|
|
57915
57915
|
|
|
57916
57916
|
//#endregion
|
|
57917
57917
|
//#region src/metadata.json
|
|
@@ -57980,6 +57980,7 @@ var presets$1 = [
|
|
|
57980
57980
|
"flatMapConditionalToFilterOrFail": "suggestion",
|
|
57981
57981
|
"flatMapIdentityToFlatten": "suggestion",
|
|
57982
57982
|
"flatMapIgnoredParamToAndThen": "suggestion",
|
|
57983
|
+
"flatMapProvideServiceToProvideServiceEffect": "suggestion",
|
|
57983
57984
|
"flatMapToMap": "suggestion",
|
|
57984
57985
|
"flatMapToTap": "suggestion",
|
|
57985
57986
|
"floatingEffect": "error",
|
|
@@ -58084,6 +58085,7 @@ var presets$1 = [
|
|
|
58084
58085
|
"flatMapConditionalToFilterOrFail": "error",
|
|
58085
58086
|
"flatMapIdentityToFlatten": "error",
|
|
58086
58087
|
"flatMapIgnoredParamToAndThen": "error",
|
|
58088
|
+
"flatMapProvideServiceToProvideServiceEffect": "error",
|
|
58087
58089
|
"flatMapToMap": "error",
|
|
58088
58090
|
"flatMapToTap": "error",
|
|
58089
58091
|
"floatingEffect": "error",
|
|
@@ -58270,8 +58272,10 @@ var presets$1 = [
|
|
|
58270
58272
|
"flatMapConditionalToFilterOrFail": "warning",
|
|
58271
58273
|
"flatMapIdentityToFlatten": "warning",
|
|
58272
58274
|
"flatMapIgnoredParamToAndThen": "warning",
|
|
58275
|
+
"flatMapProvideServiceToProvideServiceEffect": "warning",
|
|
58273
58276
|
"flatMapToMap": "warning",
|
|
58274
58277
|
"flatMapToTap": "warning",
|
|
58278
|
+
"forLoopPushToForEach": "warning",
|
|
58275
58279
|
"manualMetricTapToTrack": "warning",
|
|
58276
58280
|
"mapConstToAs": "warning",
|
|
58277
58281
|
"mapMapErrorToMapBoth": "warning",
|
|
@@ -58282,6 +58286,7 @@ var presets$1 = [
|
|
|
58282
58286
|
"matchEffectToMatch": "warning",
|
|
58283
58287
|
"matchToResultOrOption": "warning",
|
|
58284
58288
|
"missedPipeableOpportunity": "warning",
|
|
58289
|
+
"missingConcurrencyOption": "warning",
|
|
58285
58290
|
"missingEffectServiceDependency": "warning",
|
|
58286
58291
|
"missingPipeableSignature": "warning",
|
|
58287
58292
|
"multipleCatchTag": "warning",
|
|
@@ -60020,6 +60025,23 @@ var rules = [
|
|
|
60020
60025
|
}]
|
|
60021
60026
|
}
|
|
60022
60027
|
},
|
|
60028
|
+
{
|
|
60029
|
+
"name": "flatMapProvideServiceToProvideServiceEffect",
|
|
60030
|
+
"group": "style",
|
|
60031
|
+
"description": "Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService",
|
|
60032
|
+
"defaultSeverity": "suggestion",
|
|
60033
|
+
"fixable": true,
|
|
60034
|
+
"supportedEffect": ["v3", "v4"],
|
|
60035
|
+
"codes": [377194],
|
|
60036
|
+
"preview": {
|
|
60037
|
+
"sourceText": "import { Context, Effect } from \"effect\"\n\n// The quick fix rewrites this to Effect.provideServiceEffect(program, Database, makeConnection).\n// Notes:\n// - After the fix, `program` is evaluated once when the expression is built, not on every run of the callback.\n// - The Effect.gen form (`const conn = yield* makeConnection; return yield* Effect.provideService(program, Database, conn)`)\n// is deliberately not reported.\n// - On Effect v3, data-first `Effect.andThen(acquire, callback)` is not reported, since its overloads do not form a dual.\n\ninterface DatabaseConnection {\n readonly query: (sql: string) => Effect.Effect<string>\n}\n\nconst Database = Context.Service<DatabaseConnection>(\"Database\")\n\ndeclare const makeConnection: Effect.Effect<DatabaseConnection>\n\nconst program = Effect.gen(function*() {\n const db = yield* Effect.service(Database)\n return yield* db.query(\"SELECT * FROM users\")\n})\n\nexport const runWithDatabase = makeConnection.pipe(\n Effect.flatMap((conn) => Effect.provideService(program, Database, conn))\n)\n",
|
|
60038
|
+
"diagnostics": [{
|
|
60039
|
+
"start": 961,
|
|
60040
|
+
"end": 975,
|
|
60041
|
+
"text": "`Effect.provideServiceEffect` provides this service from the acquiring effect directly instead of `Effect.flatMap` forwarding its parameter to `Effect.provideService`. effect(flatMapProvideServiceToProvideServiceEffect)"
|
|
60042
|
+
}]
|
|
60043
|
+
}
|
|
60044
|
+
},
|
|
60023
60045
|
{
|
|
60024
60046
|
"name": "flatMapToMap",
|
|
60025
60047
|
"group": "style",
|
|
@@ -60054,6 +60076,23 @@ var rules = [
|
|
|
60054
60076
|
}]
|
|
60055
60077
|
}
|
|
60056
60078
|
},
|
|
60079
|
+
{
|
|
60080
|
+
"name": "forLoopPushToForEach",
|
|
60081
|
+
"group": "style",
|
|
60082
|
+
"description": "Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator",
|
|
60083
|
+
"defaultSeverity": "off",
|
|
60084
|
+
"fixable": true,
|
|
60085
|
+
"supportedEffect": ["v3", "v4"],
|
|
60086
|
+
"codes": [377170],
|
|
60087
|
+
"preview": {
|
|
60088
|
+
"sourceText": "import { Effect } from \"effect\"\n\ndeclare const items: ReadonlyArray<number>\ndeclare const processItem: (item: number) => Effect.Effect<string>\n\nexport const program = Effect.gen(function*() {\n const results = []\n for (const item of items) {\n results.push(yield* processItem(item))\n }\n return results\n})\n",
|
|
60089
|
+
"diagnostics": [{
|
|
60090
|
+
"start": 215,
|
|
60091
|
+
"end": 289,
|
|
60092
|
+
"text": "`Effect.forEach` expresses this for-of loop that pushes yielded results into an accumulator more directly, and makes ordering and concurrency explicit. effect(forLoopPushToForEach)"
|
|
60093
|
+
}]
|
|
60094
|
+
}
|
|
60095
|
+
},
|
|
60057
60096
|
{
|
|
60058
60097
|
"name": "manualMetricTapToTrack",
|
|
60059
60098
|
"group": "style",
|
|
@@ -60236,6 +60275,23 @@ var rules = [
|
|
|
60236
60275
|
}]
|
|
60237
60276
|
}
|
|
60238
60277
|
},
|
|
60278
|
+
{
|
|
60279
|
+
"name": "missingConcurrencyOption",
|
|
60280
|
+
"group": "style",
|
|
60281
|
+
"description": "Reports Effect.all and Effect.forEach calls without an explicit concurrency option, which run sequentially by default",
|
|
60282
|
+
"defaultSeverity": "off",
|
|
60283
|
+
"fixable": true,
|
|
60284
|
+
"supportedEffect": ["v3", "v4"],
|
|
60285
|
+
"codes": [377188],
|
|
60286
|
+
"preview": {
|
|
60287
|
+
"sourceText": "import { Effect } from \"effect\"\n\ndeclare const items: ReadonlyArray<number>\ndeclare const save: (n: number) => Effect.Effect<void>\n\nexport const program = Effect.forEach(items, save)\n",
|
|
60288
|
+
"diagnostics": [{
|
|
60289
|
+
"start": 155,
|
|
60290
|
+
"end": 169,
|
|
60291
|
+
"text": "`Effect.forEach` runs sequentially unless `concurrency` is set; pass `{ concurrency: 1 }` to keep sequential execution or set the concurrency you intend. effect(missingConcurrencyOption)"
|
|
60292
|
+
}]
|
|
60293
|
+
}
|
|
60294
|
+
},
|
|
60239
60295
|
{
|
|
60240
60296
|
"name": "missingEffectServiceDependency",
|
|
60241
60297
|
"group": "style",
|
|
@@ -60911,11 +60967,11 @@ var tags = {
|
|
|
60911
60967
|
"typescript": {
|
|
60912
60968
|
"latest": "7.0.2",
|
|
60913
60969
|
"beta": "7.1.0-beta",
|
|
60914
|
-
"next": "7.1.0-dev.
|
|
60970
|
+
"next": "7.1.0-dev.20261116.1"
|
|
60915
60971
|
},
|
|
60916
|
-
"oxlint": { "latest": "1.
|
|
60917
|
-
"oxlint-tsgolint": { "latest": "7.0.
|
|
60918
|
-
"tsrs": { "latest": "0.
|
|
60972
|
+
"oxlint": { "latest": "1.94.0" },
|
|
60973
|
+
"oxlint-tsgolint": { "latest": "7.0.2007" },
|
|
60974
|
+
"tsrs": { "latest": "0.25.0-ts7.1.0-beta" }
|
|
60919
60975
|
};
|
|
60920
60976
|
var components = {
|
|
60921
60977
|
"typescript": {
|
|
@@ -60927,8 +60983,8 @@ var components = {
|
|
|
60927
60983
|
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a",
|
|
60928
60984
|
"provider": "typescript"
|
|
60929
60985
|
},
|
|
60930
|
-
"7.1.0-dev.
|
|
60931
|
-
"gitHead": "
|
|
60986
|
+
"7.1.0-dev.20261116.1": {
|
|
60987
|
+
"gitHead": "6bdcb54d23f41bc7098c1f3488ac599c75b852ca",
|
|
60932
60988
|
"provider": "typescript"
|
|
60933
60989
|
}
|
|
60934
60990
|
},
|
|
@@ -60940,15 +60996,20 @@ var components = {
|
|
|
60940
60996
|
"7.0.2006": {
|
|
60941
60997
|
"gitHead": "420f4f134c4802af98780e3dc413f3452d53fe45",
|
|
60942
60998
|
"dependencies": { "typescript": "7.0.2" }
|
|
60999
|
+
},
|
|
61000
|
+
"7.0.2007": {
|
|
61001
|
+
"gitHead": "1ae4bbd516db0a7a5390e86c90623dc343dea1e6",
|
|
61002
|
+
"dependencies": { "typescript": "7.0.2" }
|
|
60943
61003
|
}
|
|
60944
61004
|
},
|
|
60945
61005
|
"oxlint": {
|
|
60946
61006
|
"1.91.0": { "gitHead": "f3fcdcc61b08e9880476279ba21a363967940fa4" },
|
|
60947
61007
|
"1.92.0": { "gitHead": "29daf901a1ea6b0a7a56c2b9d488bd2850d0abd4" },
|
|
60948
|
-
"1.93.0": { "gitHead": "7d8e1f4953a694e9705117f674933925142ed457" }
|
|
61008
|
+
"1.93.0": { "gitHead": "7d8e1f4953a694e9705117f674933925142ed457" },
|
|
61009
|
+
"1.94.0": { "gitHead": "229b69bf10a9c876f84287123fdf9d5e0747c96b" }
|
|
60949
61010
|
},
|
|
60950
|
-
"tsrs": { "0.
|
|
60951
|
-
"gitHead": "
|
|
61011
|
+
"tsrs": { "0.25.0-ts7.1.0-beta": {
|
|
61012
|
+
"gitHead": "0f82b670e4ff861840b1315f8610816229e73e3a",
|
|
60952
61013
|
"typescript": {
|
|
60953
61014
|
"version": "7.1.0-beta",
|
|
60954
61015
|
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a"
|
|
@@ -61025,7 +61086,8 @@ const tsrsTargets = [
|
|
|
61025
61086
|
"linux-x64-musl",
|
|
61026
61087
|
"linux-arm64-gnu",
|
|
61027
61088
|
"linux-arm64-musl",
|
|
61028
|
-
"win32-x64"
|
|
61089
|
+
"win32-x64",
|
|
61090
|
+
"win32-arm64"
|
|
61029
61091
|
];
|
|
61030
61092
|
const tsrsTarget = (platform, arch, glibc) => {
|
|
61031
61093
|
const target = platform === "linux" ? `${platform}-${arch}-${glibc ? "gnu" : "musl"}` : `${platform}-${arch}`;
|
|
@@ -61214,7 +61276,8 @@ const tsrsReplacementTargets = [
|
|
|
61214
61276
|
"darwin-x64",
|
|
61215
61277
|
"linux-x64-gnu",
|
|
61216
61278
|
"linux-arm64-gnu",
|
|
61217
|
-
"win32-x64"
|
|
61279
|
+
"win32-x64",
|
|
61280
|
+
"win32-arm64"
|
|
61218
61281
|
];
|
|
61219
61282
|
const packagedComponentPath = (packageDir, component, version, fileName) => gen(function* () {
|
|
61220
61283
|
const path = yield* Path$2;
|
package/oxlint-presets/index.js
CHANGED
|
@@ -159,6 +159,7 @@ export const recommended = {
|
|
|
159
159
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
160
160
|
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
161
161
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
162
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
|
|
162
163
|
"effecttsgo/flat-map-to-map": "warn",
|
|
163
164
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
164
165
|
"effecttsgo/floating-effect": "error",
|
|
@@ -268,6 +269,7 @@ export const strict = {
|
|
|
268
269
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
|
|
269
270
|
"effecttsgo/flat-map-identity-to-flatten": "error",
|
|
270
271
|
"effecttsgo/flat-map-ignored-param-to-and-then": "error",
|
|
272
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "error",
|
|
271
273
|
"effecttsgo/flat-map-to-map": "error",
|
|
272
274
|
"effecttsgo/flat-map-to-tap": "error",
|
|
273
275
|
"effecttsgo/floating-effect": "error",
|
|
@@ -368,8 +370,10 @@ export const style = {
|
|
|
368
370
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
369
371
|
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
370
372
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
373
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
|
|
371
374
|
"effecttsgo/flat-map-to-map": "warn",
|
|
372
375
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
376
|
+
"effecttsgo/for-loop-push-to-for-each": "warn",
|
|
373
377
|
"effecttsgo/manual-metric-tap-to-track": "warn",
|
|
374
378
|
"effecttsgo/map-const-to-as": "warn",
|
|
375
379
|
"effecttsgo/map-map-error-to-map-both": "warn",
|
|
@@ -380,6 +384,7 @@ export const style = {
|
|
|
380
384
|
"effecttsgo/match-effect-to-match": "warn",
|
|
381
385
|
"effecttsgo/match-to-result-or-option": "warn",
|
|
382
386
|
"effecttsgo/missed-pipeable-opportunity": "warn",
|
|
387
|
+
"effecttsgo/missing-concurrency-option": "warn",
|
|
383
388
|
"effecttsgo/missing-effect-service-dependency": "warn",
|
|
384
389
|
"effecttsgo/missing-pipeable-signature": "warn",
|
|
385
390
|
"effecttsgo/multiple-catch-tag": "warn",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
40
40
|
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
41
41
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
42
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
|
|
42
43
|
"effecttsgo/flat-map-to-map": "warn",
|
|
43
44
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
44
45
|
"effecttsgo/floating-effect": "error",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
|
|
40
40
|
"effecttsgo/flat-map-identity-to-flatten": "error",
|
|
41
41
|
"effecttsgo/flat-map-ignored-param-to-and-then": "error",
|
|
42
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "error",
|
|
42
43
|
"effecttsgo/flat-map-to-map": "error",
|
|
43
44
|
"effecttsgo/flat-map-to-tap": "error",
|
|
44
45
|
"effecttsgo/floating-effect": "error",
|
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
31
31
|
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
32
32
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
33
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": "warn",
|
|
33
34
|
"effecttsgo/flat-map-to-map": "warn",
|
|
34
35
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
36
|
+
"effecttsgo/for-loop-push-to-for-each": "warn",
|
|
35
37
|
"effecttsgo/manual-metric-tap-to-track": "warn",
|
|
36
38
|
"effecttsgo/map-const-to-as": "warn",
|
|
37
39
|
"effecttsgo/map-map-error-to-map-both": "warn",
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
"effecttsgo/match-effect-to-match": "warn",
|
|
43
45
|
"effecttsgo/match-to-result-or-option": "warn",
|
|
44
46
|
"effecttsgo/missed-pipeable-opportunity": "warn",
|
|
47
|
+
"effecttsgo/missing-concurrency-option": "warn",
|
|
45
48
|
"effecttsgo/missing-effect-service-dependency": "warn",
|
|
46
49
|
"effecttsgo/missing-pipeable-signature": "warn",
|
|
47
50
|
"effecttsgo/multiple-catch-tag": "warn",
|
package/oxlint-schema.json
CHANGED
|
@@ -1209,6 +1209,40 @@
|
|
|
1209
1209
|
},
|
|
1210
1210
|
"type": "object"
|
|
1211
1211
|
},
|
|
1212
|
+
"ChecksConditionals": {
|
|
1213
|
+
"anyOf": [
|
|
1214
|
+
{
|
|
1215
|
+
"type": "boolean"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"$ref": "#/definitions/ChecksConditionalsOptions"
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
1222
|
+
"ChecksConditionalsFlagUnions": {
|
|
1223
|
+
"enum": [
|
|
1224
|
+
"none",
|
|
1225
|
+
"strict",
|
|
1226
|
+
"all"
|
|
1227
|
+
],
|
|
1228
|
+
"type": "string"
|
|
1229
|
+
},
|
|
1230
|
+
"ChecksConditionalsOptions": {
|
|
1231
|
+
"additionalProperties": false,
|
|
1232
|
+
"properties": {
|
|
1233
|
+
"flagUnions": {
|
|
1234
|
+
"allOf": [
|
|
1235
|
+
{
|
|
1236
|
+
"$ref": "#/definitions/ChecksConditionalsFlagUnions"
|
|
1237
|
+
}
|
|
1238
|
+
],
|
|
1239
|
+
"default": "none",
|
|
1240
|
+
"description": "Controls which union types are reported in conditionals.\n- `\"none\"` only reports values that are always Promise-like.\n- `\"strict\"` also reports unions where the non-Promise types match the awaited Promise types,\nsuch as `Promise\u003cnumber\u003e | number`.\n- `\"all\"` reports any union containing a Promise-like type.",
|
|
1241
|
+
"markdownDescription": "Controls which union types are reported in conditionals.\n- `\"none\"` only reports values that are always Promise-like.\n- `\"strict\"` also reports unions where the non-Promise types match the awaited Promise types,\nsuch as `Promise\u003cnumber\u003e | number`.\n- `\"all\"` reports any union containing a Promise-like type."
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
"type": "object"
|
|
1245
|
+
},
|
|
1212
1246
|
"ChecksVoidReturn": {
|
|
1213
1247
|
"anyOf": [
|
|
1214
1248
|
{
|
|
@@ -2391,6 +2425,9 @@
|
|
|
2391
2425
|
"effecttsgo/flat-map-ignored-param-to-and-then": {
|
|
2392
2426
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2393
2427
|
},
|
|
2428
|
+
"effecttsgo/flat-map-provide-service-to-provide-service-effect": {
|
|
2429
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2430
|
+
},
|
|
2394
2431
|
"effecttsgo/flat-map-to-map": {
|
|
2395
2432
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2396
2433
|
},
|
|
@@ -2403,6 +2440,9 @@
|
|
|
2403
2440
|
"effecttsgo/floating-effect-in-vitest": {
|
|
2404
2441
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2405
2442
|
},
|
|
2443
|
+
"effecttsgo/for-loop-push-to-for-each": {
|
|
2444
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2445
|
+
},
|
|
2406
2446
|
"effecttsgo/generic-effect-services": {
|
|
2407
2447
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2408
2448
|
},
|
|
@@ -2493,6 +2533,9 @@
|
|
|
2493
2533
|
"effecttsgo/missed-pipeable-opportunity": {
|
|
2494
2534
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2495
2535
|
},
|
|
2536
|
+
"effecttsgo/missing-concurrency-option": {
|
|
2537
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2538
|
+
},
|
|
2496
2539
|
"effecttsgo/missing-effect-context": {
|
|
2497
2540
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2498
2541
|
},
|
|
@@ -15290,10 +15333,14 @@
|
|
|
15290
15333
|
"additionalProperties": false,
|
|
15291
15334
|
"properties": {
|
|
15292
15335
|
"checksConditionals": {
|
|
15336
|
+
"allOf": [
|
|
15337
|
+
{
|
|
15338
|
+
"$ref": "#/definitions/ChecksConditionals"
|
|
15339
|
+
}
|
|
15340
|
+
],
|
|
15293
15341
|
"default": true,
|
|
15294
|
-
"description": "Whether to check if Promises are used in conditionals.\
|
|
15295
|
-
"markdownDescription": "Whether to check if Promises are used in conditionals.\
|
|
15296
|
-
"type": "boolean"
|
|
15342
|
+
"description": "Whether to check if Promises are used in conditionals.\nCan be a boolean to enable/disable the check, or an object to control union types.",
|
|
15343
|
+
"markdownDescription": "Whether to check if Promises are used in conditionals.\nCan be a boolean to enable/disable the check, or an object to control union types."
|
|
15297
15344
|
},
|
|
15298
15345
|
"checksSpreads": {
|
|
15299
15346
|
"default": true,
|
|
@@ -17513,8 +17560,8 @@
|
|
|
17513
17560
|
"type": "boolean"
|
|
17514
17561
|
},
|
|
17515
17562
|
"typeCheck": {
|
|
17516
|
-
"description": "Enable
|
|
17517
|
-
"markdownDescription": "Enable
|
|
17563
|
+
"description": "Enable type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
|
|
17564
|
+
"markdownDescription": "Enable type checking (includes TypeScript compiler diagnostics).\n\nEquivalent to passing `--type-check` on the CLI.\n\nNote that this requires the `oxlint-tsgolint` package to be installed.",
|
|
17518
17565
|
"type": "boolean"
|
|
17519
17566
|
}
|
|
17520
17567
|
},
|
|
@@ -17538,8 +17585,8 @@
|
|
|
17538
17585
|
"$ref": "#/definitions/GlobSet"
|
|
17539
17586
|
}
|
|
17540
17587
|
],
|
|
17541
|
-
"description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\
|
|
17542
|
-
"markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\
|
|
17588
|
+
"description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\nExample: `[ \"*.generated.ts\", \"fixtures/**\" ]`",
|
|
17589
|
+
"markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\nExample: `[ \"*.generated.ts\", \"fixtures/**\" ]`"
|
|
17543
17590
|
},
|
|
17544
17591
|
"files": {
|
|
17545
17592
|
"allOf": [
|
|
@@ -17547,8 +17594,8 @@
|
|
|
17547
17594
|
"$ref": "#/definitions/GlobSet"
|
|
17548
17595
|
}
|
|
17549
17596
|
],
|
|
17550
|
-
"description": "A list of glob patterns to override.\n\
|
|
17551
|
-
"markdownDescription": "A list of glob patterns to override.\n\
|
|
17597
|
+
"description": "A list of glob patterns to override.\n\nExample: `[ \"*.test.ts\", \"*.spec.ts\" ]`",
|
|
17598
|
+
"markdownDescription": "A list of glob patterns to override.\n\nExample: `[ \"*.test.ts\", \"*.spec.ts\" ]`"
|
|
17552
17599
|
},
|
|
17553
17600
|
"globals": {
|
|
17554
17601
|
"allOf": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Effect Language Service for TypeScript-Go — Effect-specific diagnostics and hover features.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"schema.json"
|
|
43
43
|
],
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@effect/tsgo-win32-x64": "0.
|
|
46
|
-
"@effect/tsgo-win32-arm64": "0.
|
|
47
|
-
"@effect/tsgo-linux-x64": "0.
|
|
48
|
-
"@effect/tsgo-linux-arm64": "0.
|
|
49
|
-
"@effect/tsgo-linux-arm": "0.
|
|
50
|
-
"@effect/tsgo-darwin-x64": "0.
|
|
51
|
-
"@effect/tsgo-darwin-arm64": "0.
|
|
45
|
+
"@effect/tsgo-win32-x64": "0.70.0",
|
|
46
|
+
"@effect/tsgo-win32-arm64": "0.70.0",
|
|
47
|
+
"@effect/tsgo-linux-x64": "0.70.0",
|
|
48
|
+
"@effect/tsgo-linux-arm64": "0.70.0",
|
|
49
|
+
"@effect/tsgo-linux-arm": "0.70.0",
|
|
50
|
+
"@effect/tsgo-darwin-x64": "0.70.0",
|
|
51
|
+
"@effect/tsgo-darwin-arm64": "0.70.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@effect/platform-node": "^4.1.2",
|
package/schema.json
CHANGED
|
@@ -2571,6 +2571,11 @@
|
|
|
2571
2571
|
"default": "suggestion",
|
|
2572
2572
|
"description": "Suggests using Effect.andThen instead of Effect.flatMap when a zero-parameter callback returns an existing Effect value"
|
|
2573
2573
|
},
|
|
2574
|
+
"flatMapProvideServiceToProvideServiceEffect": {
|
|
2575
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2576
|
+
"default": "suggestion",
|
|
2577
|
+
"description": "Suggests Effect.provideServiceEffect when a flatMap or andThen callback only forwards its parameter to Effect.provideService"
|
|
2578
|
+
},
|
|
2574
2579
|
"flatMapToMap": {
|
|
2575
2580
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2576
2581
|
"default": "suggestion",
|
|
@@ -2591,6 +2596,11 @@
|
|
|
2591
2596
|
"default": "error",
|
|
2592
2597
|
"description": "Detects Effects returned from non-Effect-aware Vitest callbacks"
|
|
2593
2598
|
},
|
|
2599
|
+
"forLoopPushToForEach": {
|
|
2600
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2601
|
+
"default": "off",
|
|
2602
|
+
"description": "Suggests Effect.forEach instead of a for-of loop that pushes yielded Effect results into an accumulator"
|
|
2603
|
+
},
|
|
2594
2604
|
"genericEffectServices": {
|
|
2595
2605
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2596
2606
|
"default": "warning",
|
|
@@ -2741,6 +2751,11 @@
|
|
|
2741
2751
|
"default": "off",
|
|
2742
2752
|
"description": "Suggests using .pipe() for nested function calls"
|
|
2743
2753
|
},
|
|
2754
|
+
"missingConcurrencyOption": {
|
|
2755
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2756
|
+
"default": "off",
|
|
2757
|
+
"description": "Reports Effect.all and Effect.forEach calls without an explicit concurrency option, which run sequentially by default"
|
|
2758
|
+
},
|
|
2744
2759
|
"missingEffectContext": {
|
|
2745
2760
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2746
2761
|
"default": "error",
|