effectMapVoid
August 4, 2026 ยท View on GitHub
Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})
| Property | Value |
|---|---|
| Category | Style |
| Default severity | suggestion |
| Fixable | Yes |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377018 |
| Language Service name | effectMapVoid |
| Oxlint name | effecttsgo/effect-map-void |
Preview
import { Effect } from "effect"
export const preview = Effect.succeed(1).pipe(
Effect.map(() => undefined)
/**
^^^^^^^^^^ effecttsgo(effect-map-void): This expression discards the success value through mapping. `Effect.asVoid` represents that form directly.
*/
)
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": {
"effectMapVoid": "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/effect-map-void": "warn"
}
}