effectMapVoid

August 4, 2026 ยท View on GitHub

Suggests using Effect.asVoid instead of Effect.map(() => void 0), Effect.map(() => undefined), or Effect.map(() => {})

PropertyValue
CategoryStyle
Default severitysuggestion
FixableYes
Effect versionsv3, v4
Diagnostic codesTS377018
Language Service nameeffectMapVoid
Oxlint nameeffecttsgo/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"
  }
}