missingReturnYieldStar
August 4, 2026 ยท View on GitHub
Suggests using return yield* for Effects that never succeed
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | error |
| Fixable | Yes |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377006 |
| Language Service name | missingReturnYieldStar |
| Oxlint name | effecttsgo/missing-return-yield-star |
Preview
import * as Effect from "effect/Effect"
export const preview = Effect.gen(function*() {
yield* Effect.log("before")
yield* Effect.fail("boom")
/**
^^^^^ effecttsgo(missing-return-yield-star): This Effect never succeeds; using `return yield*` preserves a definitive generator exit point for type narrowing and tooling support.
*/
})
Language Service Configuration
See the Language Service setup guide for installation instructions.
{
"$schema": "./node_modules/@effect/tsgo/schema.json",
"compilerOptions": {
"plugins": [
{
"name": "@effect/language-service",
"diagnosticSeverity": {
"missingReturnYieldStar": "warning"
}
}
]
}
}
Oxlint Configuration
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/missing-return-yield-star": "warn"
}
}