Detects Promise types in Effect success channels where they are not awaited
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | warning |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377108 |
| Language Service name | promiseInEffectSuccess |
| Oxlint name | effecttsgo/promise-in-effect-success |
import { Effect } from "effect"
declare const save: (value: number) => Promise<void>
export const preview = Effect.succeed(1).pipe(Effect.map(save))
/**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(promise-in-effect-success): The Effect success channel contains a Promise that is not awaited. Use Effect.promise or Effect.tryPromise to represent async work.
*/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/promise-in-effect-success": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "promiseInEffectSuccess": "warning" } } ] } }