Detects nested Effects in void success channels that may cause unexecuted effects
| Property | Value |
|---|---|
| Category | Anti-pattern |
| Default severity | warning |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377020 |
| Language Service name | effectInVoidSuccess |
| Oxlint name | effecttsgo/effect-in-void-success |
import * as Effect from "effect/Effect"
export const preview: Effect.Effect<void> = Effect.succeed(
/**
^^^^^^^ effecttsgo(effect-in-void-success): There is a nested 'Effect<void, never, never>' in the 'void' success channel, beware that this could lead to nested Effect<Effect<...>> that won't be executed.
*/
Effect.log("nested")
)See the Language Service setup guide for installation instructions.
See the Oxlint setup guide for installation and patching instructions.
{
"$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
"options": {
"typeAware": true
},
"plugins": ["effecttsgo"],
"rules": {
"effecttsgo/effect-in-void-success": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "effectInVoidSuccess": "warning" } } ] } }