Detects bare yield (without *) inside Effect generator scopes
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | error |
| Fixable | Yes |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377007, TS377008 |
| Language Service name | missingStarInYieldEffectGen |
| Oxlint name | effecttsgo/missing-star-in-yield-effect-gen |
import * as Effect from "effect/Effect"
export const preview = Effect.gen(function*() {
const value = yield Effect.succeed(1)
/**
^^^^^ effecttsgo(missing-star-in-yield-effect-gen): This uses `yield` for an `Effect` value. `yield*` is the Effect-aware form in this context.
*/
return value
})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/missing-star-in-yield-effect-gen": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "missingStarInYieldEffectGen": "warning" } } ] } }