@effect/tsgo 0.59.0 → 0.62.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 +6 -4
- package/dist/effect-tsgo.cjs +59 -14
- package/oxlint-presets/index.js +6 -0
- package/oxlint-presets/recommended.json +2 -0
- package/oxlint-presets/strict.json +2 -0
- package/oxlint-presets/style.json +2 -0
- package/oxlint-schema.json +39 -1
- package/package.json +8 -8
- package/schema.json +13 -2
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@ This project targets **Effect V4** (codename: "smol") primarily and also Effect
|
|
|
6
6
|
<!-- supported-components:start -->
|
|
7
7
|
## Supported Package Versions
|
|
8
8
|
|
|
9
|
-
The following target package versions are supported by `@effect/tsgo@0.
|
|
9
|
+
The following target package versions are supported by `@effect/tsgo@0.62.0`:
|
|
10
10
|
|
|
11
11
|
| Component | Supported versions |
|
|
12
12
|
|---|---|
|
|
13
|
-
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.
|
|
13
|
+
| TypeScript | `7.0.2`, `7.1.0-beta`, `7.1.0-dev.20261027.1` |
|
|
14
14
|
| tsrs | `0.20.0-ts7.1.0-beta` |
|
|
15
|
-
| Oxlint | `1.
|
|
15
|
+
| Oxlint | `1.88.0`, `1.89.0`, `1.90.0` |
|
|
16
16
|
| oxlint-tsgolint | `7.0.2004`, `7.0.2005` |
|
|
17
17
|
<!-- supported-components:end -->
|
|
18
18
|
|
|
@@ -173,9 +173,11 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
173
173
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-sleep-zero-to-yield-now.md"><code>effectSleepZeroToYieldNow</code></a></td><td>Suggests Effect.yieldNow for cooperative yielding instead of sleeping for zero duration</td></tr>
|
|
174
174
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/effect-succeed-with-void.md"><code>effectSucceedWithVoid</code></a></td><td>Suggests using Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0)</td></tr>
|
|
175
175
|
<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>
|
|
176
|
+
<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>
|
|
176
177
|
<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>
|
|
177
178
|
<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>
|
|
178
179
|
<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>
|
|
180
|
+
<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>
|
|
179
181
|
<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>
|
|
180
182
|
<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>
|
|
181
183
|
<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>
|
|
@@ -189,7 +191,7 @@ Some diagnostics are off by default or have a default severity of suggestion, bu
|
|
|
189
191
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-barrel-import.md"><code>preferBarrelImport</code></a></td><td>Reports imports of individual modules from packages configured in barrelImportPackages that should be named imports from the package barrel</td></tr>
|
|
190
192
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-namespace-import.md"><code>preferNamespaceImport</code></a></td><td>Reports named imports from packages configured in namespaceImportPackages that should be namespace imports</td></tr>
|
|
191
193
|
<tr><td><a href="https://github.com/Effect-TS/tsgo/blob/main/docs/rules/prefer-schema-tagged-error.md"><code>preferSchemaTaggedError</code></a></td><td>Suggests using Schema.TaggedError instead of Data.TaggedError</td></tr>
|
|
192
|
-
<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<typeof X> in favor of typeof X.Type</td></tr>
|
|
194
|
+
<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<typeof X> and Schema.Codec.Encoded<typeof X>-style helpers in favor of typeof X.Type and typeof X.Encoded</td></tr>
|
|
193
195
|
<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>
|
|
194
196
|
<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's Encoded type</td></tr>
|
|
195
197
|
<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>
|
package/dist/effect-tsgo.cjs
CHANGED
|
@@ -52769,7 +52769,7 @@ const runWith = (command, config) => {
|
|
|
52769
52769
|
//#endregion
|
|
52770
52770
|
//#region package.json
|
|
52771
52771
|
var name = "@effect/tsgo";
|
|
52772
|
-
var version = "0.
|
|
52772
|
+
var version = "0.62.0";
|
|
52773
52773
|
|
|
52774
52774
|
//#endregion
|
|
52775
52775
|
//#region src/metadata.json
|
|
@@ -52834,6 +52834,7 @@ var presets$1 = [
|
|
|
52834
52834
|
"errorPayloadShadowsName": "suggestion",
|
|
52835
52835
|
"experimentalApiUsage": "warning",
|
|
52836
52836
|
"flatMapConditionalToFilterOrFail": "suggestion",
|
|
52837
|
+
"flatMapIdentityToFlatten": "suggestion",
|
|
52837
52838
|
"flatMapIgnoredParamToAndThen": "suggestion",
|
|
52838
52839
|
"flatMapToMap": "suggestion",
|
|
52839
52840
|
"flatMapToTap": "suggestion",
|
|
@@ -52846,6 +52847,7 @@ var presets$1 = [
|
|
|
52846
52847
|
"lazyEffect": "suggestion",
|
|
52847
52848
|
"lazyPromiseInEffectSync": "warning",
|
|
52848
52849
|
"leakingRequirements": "suggestion",
|
|
52850
|
+
"mapConstToAs": "suggestion",
|
|
52849
52851
|
"mapSomeToAsSome": "suggestion",
|
|
52850
52852
|
"matchEffectToMapBoth": "suggestion",
|
|
52851
52853
|
"matchEffectToMatch": "suggestion",
|
|
@@ -52927,6 +52929,7 @@ var presets$1 = [
|
|
|
52927
52929
|
"errorPayloadShadowsName": "error",
|
|
52928
52930
|
"experimentalApiUsage": "error",
|
|
52929
52931
|
"flatMapConditionalToFilterOrFail": "error",
|
|
52932
|
+
"flatMapIdentityToFlatten": "error",
|
|
52930
52933
|
"flatMapIgnoredParamToAndThen": "error",
|
|
52931
52934
|
"flatMapToMap": "error",
|
|
52932
52935
|
"flatMapToTap": "error",
|
|
@@ -52939,6 +52942,7 @@ var presets$1 = [
|
|
|
52939
52942
|
"lazyEffect": "error",
|
|
52940
52943
|
"lazyPromiseInEffectSync": "error",
|
|
52941
52944
|
"leakingRequirements": "error",
|
|
52945
|
+
"mapConstToAs": "error",
|
|
52942
52946
|
"mapSomeToAsSome": "error",
|
|
52943
52947
|
"matchEffectToMapBoth": "error",
|
|
52944
52948
|
"matchEffectToMatch": "error",
|
|
@@ -53100,9 +53104,11 @@ var presets$1 = [
|
|
|
53100
53104
|
"effectSleepZeroToYieldNow": "warning",
|
|
53101
53105
|
"effectSucceedWithVoid": "warning",
|
|
53102
53106
|
"flatMapConditionalToFilterOrFail": "warning",
|
|
53107
|
+
"flatMapIdentityToFlatten": "warning",
|
|
53103
53108
|
"flatMapIgnoredParamToAndThen": "warning",
|
|
53104
53109
|
"flatMapToMap": "warning",
|
|
53105
53110
|
"flatMapToTap": "warning",
|
|
53111
|
+
"mapConstToAs": "warning",
|
|
53106
53112
|
"mapSomeToAsSome": "warning",
|
|
53107
53113
|
"matchEffectToMapBoth": "warning",
|
|
53108
53114
|
"matchEffectToMatch": "warning",
|
|
@@ -54718,6 +54724,23 @@ var rules = [
|
|
|
54718
54724
|
}]
|
|
54719
54725
|
}
|
|
54720
54726
|
},
|
|
54727
|
+
{
|
|
54728
|
+
"name": "flatMapIdentityToFlatten",
|
|
54729
|
+
"group": "style",
|
|
54730
|
+
"description": "Suggests Effect.flatten instead of Effect.flatMap when the callback is Effect's identity export referenced directly or an unannotated function returning its parameter",
|
|
54731
|
+
"defaultSeverity": "suggestion",
|
|
54732
|
+
"fixable": true,
|
|
54733
|
+
"supportedEffect": ["v3", "v4"],
|
|
54734
|
+
"codes": [377151],
|
|
54735
|
+
"preview": {
|
|
54736
|
+
"sourceText": "import { Effect } from \"effect\"\n\ndeclare const loadTask: Effect.Effect<Effect.Effect<string>>\n\nexport const program = loadTask.pipe(Effect.flatMap((inner) => inner))\n",
|
|
54737
|
+
"diagnostics": [{
|
|
54738
|
+
"start": 132,
|
|
54739
|
+
"end": 146,
|
|
54740
|
+
"text": "`Effect.flatten` expresses this unwrapping more directly than `Effect.flatMap` with an identity callback. effect(flatMapIdentityToFlatten)"
|
|
54741
|
+
}]
|
|
54742
|
+
}
|
|
54743
|
+
},
|
|
54721
54744
|
{
|
|
54722
54745
|
"name": "flatMapIgnoredParamToAndThen",
|
|
54723
54746
|
"group": "style",
|
|
@@ -54769,6 +54792,23 @@ var rules = [
|
|
|
54769
54792
|
}]
|
|
54770
54793
|
}
|
|
54771
54794
|
},
|
|
54795
|
+
{
|
|
54796
|
+
"name": "mapConstToAs",
|
|
54797
|
+
"group": "style",
|
|
54798
|
+
"description": "Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant",
|
|
54799
|
+
"defaultSeverity": "suggestion",
|
|
54800
|
+
"fixable": true,
|
|
54801
|
+
"supportedEffect": ["v3", "v4"],
|
|
54802
|
+
"codes": [377152],
|
|
54803
|
+
"preview": {
|
|
54804
|
+
"sourceText": "import { Effect } from \"effect\"\n\nconst saveUser = (name: string): Effect.Effect<number> => Effect.succeed(name.length)\n\nexport const saved = saveUser(\"alice\").pipe(Effect.map(() => \"saved\"))\n",
|
|
54805
|
+
"diagnostics": [{
|
|
54806
|
+
"start": 164,
|
|
54807
|
+
"end": 174,
|
|
54808
|
+
"text": "`Effect.as` expresses replacing the success value with a constant directly. effect(mapConstToAs)"
|
|
54809
|
+
}]
|
|
54810
|
+
}
|
|
54811
|
+
},
|
|
54772
54812
|
{
|
|
54773
54813
|
"name": "mapSomeToAsSome",
|
|
54774
54814
|
"group": "style",
|
|
@@ -55005,7 +55045,7 @@ var rules = [
|
|
|
55005
55045
|
{
|
|
55006
55046
|
"name": "preferSchemaTypeProperty",
|
|
55007
55047
|
"group": "style",
|
|
55008
|
-
"description": "Disallows Schema.Schema.Type<typeof X> in favor of typeof X.Type",
|
|
55048
|
+
"description": "Disallows Schema.Schema.Type<typeof X> and Schema.Codec.Encoded<typeof X>-style helpers in favor of typeof X.Type and typeof X.Encoded",
|
|
55009
55049
|
"defaultSeverity": "off",
|
|
55010
55050
|
"fixable": true,
|
|
55011
55051
|
"supportedEffect": ["v3", "v4"],
|
|
@@ -55015,7 +55055,7 @@ var rules = [
|
|
|
55015
55055
|
"diagnostics": [{
|
|
55016
55056
|
"start": 97,
|
|
55017
55057
|
"end": 128,
|
|
55018
|
-
"text": "Do not use `Schema.Schema.Type<typeof X
|
|
55058
|
+
"text": "Do not use `Schema.Schema.Type<typeof X>`. Use `typeof X.Type` instead. effect(preferSchemaTypeProperty)"
|
|
55019
55059
|
}]
|
|
55020
55060
|
}
|
|
55021
55061
|
},
|
|
@@ -55422,9 +55462,9 @@ var tags = {
|
|
|
55422
55462
|
"typescript": {
|
|
55423
55463
|
"latest": "7.0.2",
|
|
55424
55464
|
"beta": "7.1.0-beta",
|
|
55425
|
-
"next": "7.1.0-dev.
|
|
55465
|
+
"next": "7.1.0-dev.20261027.1"
|
|
55426
55466
|
},
|
|
55427
|
-
"oxlint": { "latest": "1.
|
|
55467
|
+
"oxlint": { "latest": "1.90.0" },
|
|
55428
55468
|
"oxlint-tsgolint": { "latest": "7.0.2005" },
|
|
55429
55469
|
"tsrs": { "latest": "0.20.0-ts7.1.0-beta" }
|
|
55430
55470
|
};
|
|
@@ -55438,8 +55478,8 @@ var components = {
|
|
|
55438
55478
|
"gitHead": "3e9236361fa97a9e6c685f4833ac457ae2d8c50a",
|
|
55439
55479
|
"provider": "typescript"
|
|
55440
55480
|
},
|
|
55441
|
-
"7.1.0-dev.
|
|
55442
|
-
"gitHead": "
|
|
55481
|
+
"7.1.0-dev.20261027.1": {
|
|
55482
|
+
"gitHead": "49e69830214c55a8cc361aa3c4e7412d0afd02fe",
|
|
55443
55483
|
"provider": "typescript"
|
|
55444
55484
|
}
|
|
55445
55485
|
},
|
|
@@ -55454,9 +55494,9 @@ var components = {
|
|
|
55454
55494
|
}
|
|
55455
55495
|
},
|
|
55456
55496
|
"oxlint": {
|
|
55457
|
-
"1.87.0": { "gitHead": "2bd08ebe8f36fcf1954a675ffdeb4c6d0129f609" },
|
|
55458
55497
|
"1.88.0": { "gitHead": "6941b4ed45ead21c45bc2164cb80a180eed85b43" },
|
|
55459
|
-
"1.89.0": { "gitHead": "07ed78f4abde4020ca7919381ffea4da8616b78a" }
|
|
55498
|
+
"1.89.0": { "gitHead": "07ed78f4abde4020ca7919381ffea4da8616b78a" },
|
|
55499
|
+
"1.90.0": { "gitHead": "9b6fff42fa6edf0bec55861b6f0764c7b9acd86b" }
|
|
55460
55500
|
},
|
|
55461
55501
|
"tsrs": { "0.20.0-ts7.1.0-beta": {
|
|
55462
55502
|
"gitHead": "d197eeea709616d61930c2bd5eac048471e404b8",
|
|
@@ -55532,10 +55572,12 @@ const experimentalOxlintTarget = (platform, arch, glibc) => {
|
|
|
55532
55572
|
};
|
|
55533
55573
|
const tsrsTargets = [
|
|
55534
55574
|
"darwin-arm64",
|
|
55575
|
+
"darwin-x64",
|
|
55535
55576
|
"linux-x64-gnu",
|
|
55536
55577
|
"linux-x64-musl",
|
|
55537
55578
|
"linux-arm64-gnu",
|
|
55538
|
-
"linux-arm64-musl"
|
|
55579
|
+
"linux-arm64-musl",
|
|
55580
|
+
"win32-x64"
|
|
55539
55581
|
];
|
|
55540
55582
|
const tsrsTarget = (platform, arch, glibc) => {
|
|
55541
55583
|
const target = platform === "linux" ? `${platform}-${arch}-${glibc ? "gnu" : "musl"}` : `${platform}-${arch}`;
|
|
@@ -55596,6 +55638,7 @@ const discoverOxlint = (cwdRequire) => gen(function* () {
|
|
|
55596
55638
|
}
|
|
55597
55639
|
return discovered;
|
|
55598
55640
|
});
|
|
55641
|
+
const tsrsExecutableName = (platform) => platform === "win32" ? "tsrs.exe" : "tsrs";
|
|
55599
55642
|
const discoverTsrs = (cwdRequire) => gen(function* () {
|
|
55600
55643
|
const path = yield* Path$2;
|
|
55601
55644
|
const tsrs = yield* optionally(readPackage(cwdRequire, "tsrs"));
|
|
@@ -55609,7 +55652,7 @@ const discoverTsrs = (cwdRequire) => gen(function* () {
|
|
|
55609
55652
|
component: "tsrs",
|
|
55610
55653
|
packageName: platformPackageName,
|
|
55611
55654
|
packageVersion: platformPackage.version,
|
|
55612
|
-
binaryPath: path.join(path.dirname(platformPackage.packageJsonPath),
|
|
55655
|
+
binaryPath: path.join(path.dirname(platformPackage.packageJsonPath), tsrsExecutableName(process.platform))
|
|
55613
55656
|
}];
|
|
55614
55657
|
});
|
|
55615
55658
|
const discoverVitePlusOxlint = (cwdRequire) => gen(function* () {
|
|
@@ -55720,8 +55763,10 @@ const resolvePlatformPackage = (target) => resolvePlatformPackageDirectory.pipe(
|
|
|
55720
55763
|
})));
|
|
55721
55764
|
const tsrsReplacementTargets = [
|
|
55722
55765
|
"darwin-arm64",
|
|
55766
|
+
"darwin-x64",
|
|
55723
55767
|
"linux-x64-gnu",
|
|
55724
|
-
"linux-arm64-gnu"
|
|
55768
|
+
"linux-arm64-gnu",
|
|
55769
|
+
"win32-x64"
|
|
55725
55770
|
];
|
|
55726
55771
|
const packagedComponentPath = (packageDir, component, version, fileName) => gen(function* () {
|
|
55727
55772
|
const path = yield* Path$2;
|
|
@@ -205031,7 +205076,7 @@ const ensureExecutable = (filePath, platform) => gen(function* () {
|
|
|
205031
205076
|
});
|
|
205032
205077
|
const executablePath = (filePath, platform) => platform === "win32" && filePath.length >= 248 ? node_path.win32.toNamespacedPath(filePath) : filePath;
|
|
205033
205078
|
const tscExecutable = (context, version) => packagedComponentPath(context.packageDirectory, "typescript", version, context.platform === "win32" ? "tsc.exe" : "tsc");
|
|
205034
|
-
const tsrsExecutable = (context, version) => packagedComponentPath(context.packageDirectory, "tsrs", version,
|
|
205079
|
+
const tsrsExecutable = (context, version) => packagedComponentPath(context.packageDirectory, "tsrs", version, tsrsExecutableName(context.platform));
|
|
205035
205080
|
const resolveTsc = (context, invocation) => gen(function* () {
|
|
205036
205081
|
const installed = invocation.version === void 0 ? yield* installedTypescriptVersion(context) : void 0;
|
|
205037
205082
|
const executable = yield* requireArtifact(yield* tscExecutable(context, yield* selectVersion("tsc", "typescript", invocation.version, installed)));
|
|
@@ -205054,7 +205099,7 @@ const resolveTsrs = (context, invocation) => gen(function* () {
|
|
|
205054
205099
|
if (!(yield* fs.exists(libraryPath).pipe(mapError(toProxyError)))) return yield* new ProxyError({ reason: `Missing ${libraryPath}: tsrs needs its lib*.d.ts files next to the packaged binary ${executable}. Reinstall @effect/tsgo-${context.platform}-${context.arch}.` });
|
|
205055
205100
|
yield* ensureExecutable(executable, context.platform);
|
|
205056
205101
|
return {
|
|
205057
|
-
file: executable,
|
|
205102
|
+
file: executablePath(executable, context.platform),
|
|
205058
205103
|
args: invocation.args,
|
|
205059
205104
|
env: context.env
|
|
205060
205105
|
};
|
package/oxlint-presets/index.js
CHANGED
|
@@ -153,6 +153,7 @@ export const recommended = {
|
|
|
153
153
|
"effecttsgo/error-payload-shadows-name": "warn",
|
|
154
154
|
"effecttsgo/experimental-api-usage": "warn",
|
|
155
155
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
156
|
+
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
156
157
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
157
158
|
"effecttsgo/flat-map-to-map": "warn",
|
|
158
159
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
@@ -165,6 +166,7 @@ export const recommended = {
|
|
|
165
166
|
"effecttsgo/lazy-effect": "warn",
|
|
166
167
|
"effecttsgo/lazy-promise-in-effect-sync": "warn",
|
|
167
168
|
"effecttsgo/leaking-requirements": "warn",
|
|
169
|
+
"effecttsgo/map-const-to-as": "warn",
|
|
168
170
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
169
171
|
"effecttsgo/match-effect-to-map-both": "warn",
|
|
170
172
|
"effecttsgo/match-effect-to-match": "warn",
|
|
@@ -251,6 +253,7 @@ export const strict = {
|
|
|
251
253
|
"effecttsgo/error-payload-shadows-name": "error",
|
|
252
254
|
"effecttsgo/experimental-api-usage": "error",
|
|
253
255
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
|
|
256
|
+
"effecttsgo/flat-map-identity-to-flatten": "error",
|
|
254
257
|
"effecttsgo/flat-map-ignored-param-to-and-then": "error",
|
|
255
258
|
"effecttsgo/flat-map-to-map": "error",
|
|
256
259
|
"effecttsgo/flat-map-to-tap": "error",
|
|
@@ -263,6 +266,7 @@ export const strict = {
|
|
|
263
266
|
"effecttsgo/lazy-effect": "error",
|
|
264
267
|
"effecttsgo/lazy-promise-in-effect-sync": "error",
|
|
265
268
|
"effecttsgo/leaking-requirements": "error",
|
|
269
|
+
"effecttsgo/map-const-to-as": "error",
|
|
266
270
|
"effecttsgo/map-some-to-as-some": "error",
|
|
267
271
|
"effecttsgo/match-effect-to-map-both": "error",
|
|
268
272
|
"effecttsgo/match-effect-to-match": "error",
|
|
@@ -340,9 +344,11 @@ export const style = {
|
|
|
340
344
|
"effecttsgo/effect-sleep-zero-to-yield-now": "warn",
|
|
341
345
|
"effecttsgo/effect-succeed-with-void": "warn",
|
|
342
346
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
347
|
+
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
343
348
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
344
349
|
"effecttsgo/flat-map-to-map": "warn",
|
|
345
350
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
351
|
+
"effecttsgo/map-const-to-as": "warn",
|
|
346
352
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
347
353
|
"effecttsgo/match-effect-to-map-both": "warn",
|
|
348
354
|
"effecttsgo/match-effect-to-match": "warn",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"effecttsgo/error-payload-shadows-name": "warn",
|
|
36
36
|
"effecttsgo/experimental-api-usage": "warn",
|
|
37
37
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
38
|
+
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
38
39
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
39
40
|
"effecttsgo/flat-map-to-map": "warn",
|
|
40
41
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"effecttsgo/lazy-effect": "warn",
|
|
48
49
|
"effecttsgo/lazy-promise-in-effect-sync": "warn",
|
|
49
50
|
"effecttsgo/leaking-requirements": "warn",
|
|
51
|
+
"effecttsgo/map-const-to-as": "warn",
|
|
50
52
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
51
53
|
"effecttsgo/match-effect-to-map-both": "warn",
|
|
52
54
|
"effecttsgo/match-effect-to-match": "warn",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"effecttsgo/error-payload-shadows-name": "error",
|
|
36
36
|
"effecttsgo/experimental-api-usage": "error",
|
|
37
37
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "error",
|
|
38
|
+
"effecttsgo/flat-map-identity-to-flatten": "error",
|
|
38
39
|
"effecttsgo/flat-map-ignored-param-to-and-then": "error",
|
|
39
40
|
"effecttsgo/flat-map-to-map": "error",
|
|
40
41
|
"effecttsgo/flat-map-to-tap": "error",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"effecttsgo/lazy-effect": "error",
|
|
48
49
|
"effecttsgo/lazy-promise-in-effect-sync": "error",
|
|
49
50
|
"effecttsgo/leaking-requirements": "error",
|
|
51
|
+
"effecttsgo/map-const-to-as": "error",
|
|
50
52
|
"effecttsgo/map-some-to-as-some": "error",
|
|
51
53
|
"effecttsgo/match-effect-to-map-both": "error",
|
|
52
54
|
"effecttsgo/match-effect-to-match": "error",
|
|
@@ -26,9 +26,11 @@
|
|
|
26
26
|
"effecttsgo/effect-sleep-zero-to-yield-now": "warn",
|
|
27
27
|
"effecttsgo/effect-succeed-with-void": "warn",
|
|
28
28
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": "warn",
|
|
29
|
+
"effecttsgo/flat-map-identity-to-flatten": "warn",
|
|
29
30
|
"effecttsgo/flat-map-ignored-param-to-and-then": "warn",
|
|
30
31
|
"effecttsgo/flat-map-to-map": "warn",
|
|
31
32
|
"effecttsgo/flat-map-to-tap": "warn",
|
|
33
|
+
"effecttsgo/map-const-to-as": "warn",
|
|
32
34
|
"effecttsgo/map-some-to-as-some": "warn",
|
|
33
35
|
"effecttsgo/match-effect-to-map-both": "warn",
|
|
34
36
|
"effecttsgo/match-effect-to-match": "warn",
|
package/oxlint-schema.json
CHANGED
|
@@ -837,6 +837,18 @@
|
|
|
837
837
|
},
|
|
838
838
|
"type": "object"
|
|
839
839
|
},
|
|
840
|
+
"AwaitThenableConfig": {
|
|
841
|
+
"additionalProperties": false,
|
|
842
|
+
"properties": {
|
|
843
|
+
"allowMixedPromiseArrays": {
|
|
844
|
+
"default": false,
|
|
845
|
+
"description": "Allow Promise aggregators such as `Promise.all` to receive mixed arrays or\niterables containing at least one potentially Promise-like value.\nInputs containing only synchronous values are still reported.",
|
|
846
|
+
"markdownDescription": "Allow Promise aggregators such as `Promise.all` to receive mixed arrays or\niterables containing at least one potentially Promise-like value.\nInputs containing only synchronous values are still reported.",
|
|
847
|
+
"type": "boolean"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
"type": "object"
|
|
851
|
+
},
|
|
840
852
|
"BanConfigValue": {
|
|
841
853
|
"anyOf": [
|
|
842
854
|
{
|
|
@@ -2344,6 +2356,9 @@
|
|
|
2344
2356
|
"effecttsgo/flat-map-conditional-to-filter-or-fail": {
|
|
2345
2357
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2346
2358
|
},
|
|
2359
|
+
"effecttsgo/flat-map-identity-to-flatten": {
|
|
2360
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2361
|
+
},
|
|
2347
2362
|
"effecttsgo/flat-map-ignored-param-to-and-then": {
|
|
2348
2363
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2349
2364
|
},
|
|
@@ -2413,6 +2428,9 @@
|
|
|
2413
2428
|
"effecttsgo/leaking-requirements": {
|
|
2414
2429
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2415
2430
|
},
|
|
2431
|
+
"effecttsgo/map-const-to-as": {
|
|
2432
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
2433
|
+
},
|
|
2416
2434
|
"effecttsgo/map-some-to-as-some": {
|
|
2417
2435
|
"$ref": "#/definitions/RuleNoConfig"
|
|
2418
2436
|
},
|
|
@@ -7797,7 +7815,24 @@
|
|
|
7797
7815
|
]
|
|
7798
7816
|
},
|
|
7799
7817
|
"typescript/await-thenable": {
|
|
7800
|
-
"
|
|
7818
|
+
"anyOf": [
|
|
7819
|
+
{
|
|
7820
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
"items": [
|
|
7824
|
+
{
|
|
7825
|
+
"$ref": "#/definitions/AllowWarnDeny"
|
|
7826
|
+
},
|
|
7827
|
+
{
|
|
7828
|
+
"$ref": "#/definitions/AwaitThenableConfig"
|
|
7829
|
+
}
|
|
7830
|
+
],
|
|
7831
|
+
"maxItems": 2,
|
|
7832
|
+
"minItems": 2,
|
|
7833
|
+
"type": "array"
|
|
7834
|
+
}
|
|
7835
|
+
]
|
|
7801
7836
|
},
|
|
7802
7837
|
"typescript/ban-ts-comment": {
|
|
7803
7838
|
"anyOf": [
|
|
@@ -8583,6 +8618,9 @@
|
|
|
8583
8618
|
"typescript/no-unsafe-declaration-merging": {
|
|
8584
8619
|
"$ref": "#/definitions/RuleNoConfig"
|
|
8585
8620
|
},
|
|
8621
|
+
"typescript/no-unsafe-enum-assignment": {
|
|
8622
|
+
"$ref": "#/definitions/RuleNoConfig"
|
|
8623
|
+
},
|
|
8586
8624
|
"typescript/no-unsafe-enum-comparison": {
|
|
8587
8625
|
"$ref": "#/definitions/RuleNoConfig"
|
|
8588
8626
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect/tsgo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.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-
|
|
45
|
-
"@effect/tsgo-win32-
|
|
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-arm64": "0.62.0",
|
|
45
|
+
"@effect/tsgo-win32-x64": "0.62.0",
|
|
46
|
+
"@effect/tsgo-linux-x64": "0.62.0",
|
|
47
|
+
"@effect/tsgo-linux-arm64": "0.62.0",
|
|
48
|
+
"@effect/tsgo-linux-arm": "0.62.0",
|
|
49
|
+
"@effect/tsgo-darwin-x64": "0.62.0",
|
|
50
|
+
"@effect/tsgo-darwin-arm64": "0.62.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@effect/platform-node": "^4.0.2",
|
package/schema.json
CHANGED
|
@@ -2524,6 +2524,11 @@
|
|
|
2524
2524
|
"default": "suggestion",
|
|
2525
2525
|
"description": "Suggests Effect.filterOrFail or Effect.filterOrElse when Effect.flatMap conditionally passes its input through with Effect.succeed"
|
|
2526
2526
|
},
|
|
2527
|
+
"flatMapIdentityToFlatten": {
|
|
2528
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2529
|
+
"default": "suggestion",
|
|
2530
|
+
"description": "Suggests Effect.flatten instead of Effect.flatMap when the callback is Effect's identity export referenced directly or an unannotated function returning its parameter"
|
|
2531
|
+
},
|
|
2527
2532
|
"flatMapIgnoredParamToAndThen": {
|
|
2528
2533
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2529
2534
|
"default": "suggestion",
|
|
@@ -2639,6 +2644,11 @@
|
|
|
2639
2644
|
"default": "suggestion",
|
|
2640
2645
|
"description": "Detects implementation services leaked in service methods"
|
|
2641
2646
|
},
|
|
2647
|
+
"mapConstToAs": {
|
|
2648
|
+
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2649
|
+
"default": "suggestion",
|
|
2650
|
+
"description": "Suggests using Effect.as instead of Effect.map when the callback ignores its input and returns a constant"
|
|
2651
|
+
},
|
|
2642
2652
|
"mapSomeToAsSome": {
|
|
2643
2653
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2644
2654
|
"default": "suggestion",
|
|
@@ -2792,7 +2802,7 @@
|
|
|
2792
2802
|
"preferSchemaTypeProperty": {
|
|
2793
2803
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
2794
2804
|
"default": "off",
|
|
2795
|
-
"description": "Disallows Schema.Schema.Type\u003ctypeof X\u003e in favor of typeof X.Type"
|
|
2805
|
+
"description": "Disallows Schema.Schema.Type\u003ctypeof X\u003e and Schema.Codec.Encoded\u003ctypeof X\u003e-style helpers in favor of typeof X.Type and typeof X.Encoded"
|
|
2796
2806
|
},
|
|
2797
2807
|
"preferSucceedSomeOrNone": {
|
|
2798
2808
|
"$ref": "#/definitions/effectLanguageServicePluginSeverityDefinition",
|
|
@@ -3022,7 +3032,8 @@
|
|
|
3022
3032
|
"enum": [
|
|
3023
3033
|
"service",
|
|
3024
3034
|
"error",
|
|
3025
|
-
"custom"
|
|
3035
|
+
"custom",
|
|
3036
|
+
"taggedClass"
|
|
3026
3037
|
],
|
|
3027
3038
|
"type": "string"
|
|
3028
3039
|
}
|