Suggests using Effect.gen or Effect.fn instead of the Effect.Do notation helpers
| Property | Value |
|---|---|
| Category | Style |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377085 |
| Language Service name | effectDoNotation |
| Oxlint name | effecttsgo/effect-do-notation |
import { Effect } from "effect"
import { pipe } from "effect/Function"
export const preview = pipe(
Effect.Do,
/**
^^^^^^^^^ effecttsgo(effect-do-notation): This uses the Effect do emulation. `Effect.gen` or `Effect.fn` achieve the same result with native JS scopes.
*/
Effect.bind("a", () => Effect.succeed(1)),
Effect.let("b", ({ a }) => a + 1),
Effect.bind("c", ({ b }) => Effect.succeed(b.toString()))
)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-do-notation": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "effectDoNotation": "warning" } } ] } }