The best way to control Claude Code, Codex and more from any computer or phone
chore(lint): enforce mapSomeToAsSome (#25078)
Julius Marminge committed
Oct 25, 2026 at 17:17 UTC
0aeb620a1cc077594f6826c4299f453ea346f8b2
16 files changed
+18
-17
apps/server/src/device/easProjectId.ts
+1
-1
@@ -178,7 +178,7 @@ const projectIdsOf = Effect.fn("easProjectId.projectIdsOf")(function* (dir: stri
178
}
179
for (const file of JSON_CONFIG_FILES) {
180
const json = yield* fs.readFileString(path.join(dir, file)).pipe(
181
- Effect.map(Option.some),
181
+ Effect.asSome,
182
Effect.catch((error) =>
183
Effect.succeed(error.reason._tag === "NotFound" ? Option.none<string>() : null),
184
),
apps/server/src/orchestration-v2/CommandReceiptStore.ts
+2
-2
@@ -165,7 +165,7 @@ const layerBase: Layer.Layer<
165
onSome: (receipt) =>
166
receipt.aggregateKind !== "thread"
167
? Effect.succeed(Option.none())
168
- : fromApplicationReceipt(receipt).pipe(Effect.map(Option.some)),
168
+ : fromApplicationReceipt(receipt).pipe(Effect.asSome),
169
}),
170
),
171
Effect.mapError(
@@ -189,7 +189,7 @@ const layerBase: Layer.Layer<
189
resultSequence: receipt.value.resultSequence,
190
status: receipt.value.status,
191
error: receipt.value.error,
192
- }).pipe(Effect.map(Option.some)),
192
+ }).pipe(Effect.asSome),
193
),
194
Effect.mapError((cause) => new CommandReceiptStoreReadError({ commandId, cause })),
195
),
apps/server/src/orchestration-v2/EffectOutbox.ts
+1
-1
@@ -421,7 +421,7 @@ export const layer: Layer.Layer<EffectOutboxV2, never, SqlClient.SqlClient> = La
421
const row = rows[0];
422
return row === undefined
423
? Effect.succeed(Option.none())
424
- : rowToEffect(row).pipe(Effect.map(Option.some));
424
+ : rowToEffect(row).pipe(Effect.asSome);
425
}),
426
Effect.mapError((cause) => new EffectOutboxError({ operation: "get", effectId, cause })),
427
),
apps/server/src/orchestration-v2/PullRequestWatchReactor.ts
+1
-1
@@ -464,7 +464,7 @@ export const make = Effect.gen(function* () {
464
[
465
pullRequests.detail({ ...reference, allowStale: false }),
466
plan.activity
467
- ? pullRequests.activity(reference).pipe(Effect.map(Option.some))
467
+ ? pullRequests.activity(reference).pipe(Effect.asSome)
468
: Effect.succeed(Option.none<PullRequestActivity>()),
469
],
470
{ concurrency: 2 },
apps/server/src/orchestration-v2/RunExecutionService.test.ts
+1
-1
@@ -1834,7 +1834,7 @@ it.effect.each([null, "run:nested-sdk"] as const)(
1834
keepEventStreamOpen: true,
1835
onEventsConsumed: Deferred.succeed(consumed, undefined).pipe(Effect.asVoid),
1836
},
1837
- ).pipe(Effect.map(Option.some)),
1837
+ ).pipe(Effect.asSome),
1838
Deferred.await(consumed).pipe(Effect.as(Option.none())),
1839
);
1840
assert.isTrue(
packages/client-runtime/src/platform/orchestrationCache.test.ts
+1
-1
@@ -107,7 +107,7 @@ describe("orchestration cache envelopes", () => {
107
const decoded = Effect.try({
108
try: () => decodeStoredShellSnapshotSync({ ...encodedShell, schemaVersion: 1 }),
109
catch: (cause) => new TestCacheDecodeError({ message: String(cause) }),
110
- }).pipe(Effect.map(Option.some));
110
+ }).pipe(Effect.asSome);
111
112
const result = yield* decodeOrDiscardOrchestrationCache(
113
decoded,
packages/client-runtime/src/state/queryPersistence.ts
+1
-1
@@ -32,7 +32,7 @@ export function persistQuery<A, I>(schema: Schema.Codec<A, I>): QueryPersistence
32
const stored = yield* store.load(environmentId, key);
33
if (Option.isNone(stored)) return Option.none<A>();
34
return yield* Schema.decodeUnknownEffect(codec)(stored.value).pipe(
35
- Effect.map(Option.some),
35
+ Effect.asSome,
36
Effect.catch(() => Effect.succeedNone),
37
);
38
}),
packages/provider-acp-registry/src/server/AcpRegistryRuntimeCoordinator.ts
+1
-1
@@ -150,7 +150,7 @@ const make = Effect.gen(function* () {
150
Stream.runHead,
151
Effect.as(Option.none()),
152
);
153
- return yield* Effect.raceFirst(effect.pipe(Effect.map(Option.some)), foregroundStarted);
153
+ return yield* Effect.raceFirst(effect.pipe(Effect.asSome), foregroundStarted);
154
}),
155
);
156
packages/provider-acp-registry/src/server/driver.ts
+1
-1
@@ -639,7 +639,7 @@ export const AcpRegistryDriver: ProviderDriver<AcpRegistrySettings, AcpRegistryD
639
: effectiveConfig.agentId,
640
enrichProviderCached(snapshot),
641
)
642
- : enrichProviderCached(snapshot).pipe(Effect.map(Option.some))
642
+ : enrichProviderCached(snapshot).pipe(Effect.asSome)
643
).pipe(
644
Effect.flatMap(
645
Option.match({
packages/provider-muse/src/server/adapter.ts
+1
-1
@@ -1356,7 +1356,7 @@ export const makeMuseAdapterV2 = Effect.fn("makeMuseAdapterV2")(function* (
1356
detail: null,
1357
...(notification ? { notification } : {}),
1358
dispatchIfCurrent: (dispatch) =>
1359
- wake === held ? Effect.map(dispatch, Option.some) : Effect.succeed(Option.none()),
1359
+ wake === held ? Effect.asSome(dispatch) : Effect.succeed(Option.none()),
1360
clearIfCurrent: () =>
1361
Effect.sync(() => {
1362
if (wake === held) wake = undefined;
packages/provider-opencode/src/server/v2/adapter.ts
+1
-1
@@ -1504,7 +1504,7 @@ export const make = Effect.fn("OpenCode2Adapter.make")(function* (instanceId: Pr
1504
messageId: wake.messageId,
1505
...(notification === null ? {} : { notification }),
1506
dispatchIfCurrent: (dispatch) =>
1507
- wake.dropped ? Effect.succeed(Option.none()) : Effect.map(dispatch, Option.some),
1507
+ wake.dropped ? Effect.succeed(Option.none()) : Effect.asSome(dispatch),
1508
});
1509
});
1510
packages/provider-pi/src/server/adapter.ts
+1
-1
@@ -1660,7 +1660,7 @@ export const makePiAdapterV2 = Effect.fn("makePiAdapterV2")(function* (
1660
Effect.suspend(() =>
1661
pendingWake === wake && threadState === state && !closed
1662
? dispatch.pipe(
1663
- Effect.map(Option.some),
1663
+ Effect.asSome,
1664
Effect.tapError(() => stopPendingWake(wake)),
1665
)
1666
: Effect.succeed(Option.none()),
packages/provider-pi/src/server/rpc.ts
+1
-1
@@ -322,7 +322,7 @@ export const makePiRpcConnection = Effect.fnUntraced(function* (options: PiRpcSp
322
const polled = yield* Deferred.poll(exitDeferred);
323
const maybeExitCode = Option.isSome(polled)
324
? yield* polled.value.pipe(
325
- Effect.map(Option.some),
325
+ Effect.asSome,
326
Effect.orElseSucceed(() => Option.none<number>()),
327
)
328
: yield* Deferred.await(exitDeferred).pipe(
packages/shared/src/symlink.ts
+1
-1
@@ -25,7 +25,7 @@ export const resolveSymlinkTarget = Effect.fn("symlink.resolveSymlinkTarget")(fu
25
let current = path.resolve(filePath);
26
for (let hop = 0; hop < MAX_SYMLINK_HOPS; hop++) {
27
const link = yield* fs.readLink(current).pipe(
28
- Effect.map(Option.some),
28
+ Effect.asSome,
29
Effect.catchIf(isNotASymlink, () => Effect.succeedNone),
30
);
31
if (Option.isNone(link)) {
packages/source-control-gitcafe/src/server/GitCafePullRequestProvider.ts
+2
-2
@@ -413,7 +413,7 @@ export const make = Effect.gen(function* () {
413
{ path: `/users/${encodeURIComponent(handle)}` },
414
User,
415
).pipe(
416
- Effect.map(Option.some),
416
+ Effect.asSome,
417
Effect.catchTags({
418
PullRequestProviderError: (error) =>
419
error.reason === "unauthenticated" || error.reason === "rate-limited"
@@ -768,7 +768,7 @@ export const make = Effect.gen(function* () {
768
{ path: "/auth/principal" },
769
Principal,
770
).pipe(
771
- Effect.map(Option.some),
771
+ Effect.asSome,
772
Effect.catchTags({
773
PullRequestProviderError: (error) =>
774
error.reason === "unauthenticated" || error.reason === "rate-limited"
tsconfig.base.json
+1
@@ -24,6 +24,7 @@
24
"namespaceImportPackages": ["@effect/platform-node", "effect"],
25
"effectFn": ["span", "inferred-span", "suggested-span"],
26
"diagnosticSeverity": {
27
+ "mapSomeToAsSome": "error",
28
"unnecessaryPipeChain": "error",
29
"effectFnOpportunity": "suggestion",
30
"anyUnknownInErrorContext": "error",