From eb9f09b42aaf3be75bc403632a559bb3dd627da9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 27 Nov 2026 09:10:54 +0000 Subject: [PATCH] Import Effect from its submodules and lint that shape. The CLI was the only file that imported named values from the effect package barrel. The other Effect rules enabled here already pass on this tree. effect/effect-run-in-body stays off because runApi is the client boundary. Co-authored-by: Jonathan Beckman --- oxlint.config.ts | 15 +++++++++++++++ src/index.ts | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/oxlint.config.ts b/oxlint.config.ts index b23b61f9..fc2b08b5 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -36,6 +36,7 @@ export default defineConfig({ // solzero/no-return-in-arrow rejects the Drizzle and React callbacks. // solzero/prevent-dynamic-imports rejects the Vite plugin imports. // solzero/no-manual-effect-channels rejects the runApi callback contract. + // effect/effect-run-in-body rejects Effect.runPromise in runApi, which is the client boundary. "effect/throw-in-effect-gen": "error", "effect/avoid-any": "error", "effect/avoid-ts-ignore": "error", @@ -63,6 +64,20 @@ export default defineConfig({ "solzero/no-effect-orElse-ladder": "error", "solzero/prefer-option-over-null": "error", "solzero/avoid-untagged-errors": "error", + // The tree already imports Effect from its submodules. Keep the package barrel out. + "effect/no-barrel-imports": "error", + "effect/avoid-data-tagged-error": "error", + "effect/avoid-option-getorthrow": "error", + "effect/avoid-yield-ref": "error", + "effect/no-effect-ignore-then-as": "error", + "effect/avoid-platform-coupling": "error", + "effect/context-tag-extends": "error", + "effect/avoid-schema-suffix": "error", + "effect/no-opaque-instance-fields": "error", + "effect/prefer-array-fromoption-over-option-match-empty": "error", + "effect/effect-promise-vs-trypromise": "error", + "effect/effect-catchall-default": "error", + "effect/avoid-expect-in-if": "error", }, overrides: [ { diff --git a/src/index.ts b/src/index.ts index 95d0c805..6784ad4f 100755 --- a/src/index.ts +++ b/src/index.ts @@ -7,8 +7,10 @@ import path, { dirname } from "node:path" import { fileURLToPath } from "node:url" import { NodeRuntime, NodeServices } from "@effect/platform-node" import dotenv from "dotenv" -import { Console, Effect, Option } from "effect" import { Command, Flag } from "effect/cli" +import * as Console from "effect/Console" +import * as Effect from "effect/Effect" +import * as Option from "effect/Option" import packageJson from "../package.json" with { type: "json" } const __filename = fileURLToPath(import.meta.url)