Rules marked β are errors by default. Rules marked β οΈ are warnings. Rules marked β are off by default and must be enabled in
diagnosticSeverity.anyUnknownInErrorContext
Severity: β off by default Β Β·Β V3/V4: β / β
Detects any or unknown types in the error (E) or requirements (R) channels of an Effect. These imprecise types defeat the purpose of Effectβs typed error and dependency channels.
Enable this rule to enforce fully typed channels across your codebase.
classSelfMismatch
Severity: β error Β Β·Β Fix: π§ Β Β·Β V3/V4: β / β
Ensures that the Self type parameter passed to Effect.Service, Effect.Tag, ServiceMap.Service, or Schema class constructors matches the class name. A mismatch breaks the service identity used internally by the Context system.
duplicatePackage
Severity: β οΈ warning Β Β·Β V3/V4: β / β
Warns when multiple versions of an Effect-related package are present in the programβs dependency graph. Duplicate packages cause services to have different identities in each copy, breaking Context lookups silently.
allowedDuplicatedPackages:
effectFnImplicitAny
Severity: β error Β Β·Β V3/V4: β / β
Mirrors TypeScriptβs noImplicitAny check for parameters inside Effect.fn, Effect.fnUntraced, and Effect.fnUntracedEager callbacks when no outer contextual function type provides the annotation. Requires noImplicitAny: true in tsconfig.json.
floatingEffect
Severity: β error Β Β·Β V3/V4: β / β
Detects Effect values that are created as standalone expression statements β neither yielded inside a generator nor assigned to a variable. A floating Effect is never executed and indicates a missing yield* or assignment.
genericEffectServices
Severity: β οΈ warning Β Β·Β V3/V4: β / β
Prevents defining Effect.Service or Effect.Tag classes with type parameters. Generic services cannot be discriminated at runtime because different instantiations share the same tag identifier, leading to unexpected behavior when looking up services from Context.
missingEffectContext
Severity: β error Β Β·Β V3/V4: β / β
Detects Effect values whose requirements channel (R) contains services that have not been provided. This is analogous to a missing import β the effect cannot run without those services.
missingEffectError
Severity: β error Β Β·Β Fix: π§ Β Β·Β V3/V4: β / β
Detects Effect values whose error channel (E) contains error types that are not handled by the type expected at that position. This flags type-level mismatches where errors leak through unhandled.
missingLayerContext
Severity: β error Β Β·Β V3/V4: β / β
Detects Layer values whose input requirements (RIn) contain services that are not satisfied by the composed layers. Similar to missingEffectContext but for the layer graph.
missingReturnYieldStar
Severity: β error Β Β·Β Fix: π§ Β Β·Β V3/V4: β / β
Suggests using return yield* for Effects that never succeed (success type is never). Using return yield* instead of just yield* signals a definitive exit point, improving type narrowing and tooling support for exhaustive pattern matching.
missingStarInYieldEffectGen
Severity: β error Β Β·Β Fix: π§ Β Β·Β V3/V4: β / β
Detects bare yield (without *) inside Effect generator scopes. Inside Effect.gen, you must always use yield* to unwrap an Effect. Using yield without * returns the raw Effect object rather than executing it.
nonObjectEffectServiceType
Severity: β error Β Β·Β V3 only Β Β·Β V4: β
Ensures that the service type in Effect.Service is an object type ({}) and not a primitive. Effectβs Context system requires object types to safely attach tag metadata. This rule is V3-only because V4βs ServiceMap.Service handles primitives differently.
outdatedApi
Severity: β οΈ warning Β Β·Β V3: β Β Β·Β V4 only
Detects usage of APIs that were removed or renamed in Effect V4. The diagnostic message includes the V3 API that was used and guidance on the V4 replacement. This rule is only active when the language service detects an Effect V4 project.
overriddenSchemaConstructor
Severity: β error Β Β·Β Fix: π§ Β Β·Β V3/V4: β / β
Prevents overriding the constructor in classes that extend a Schema class (Schema.Class, Schema.TaggedClass, Schema.TaggedError, etc.). Overriding the constructor silently breaks the schemaβs decoding behaviour. Use a static factory method instead.
new method.