floatingEffectInVitest

August 4, 2026 ยท View on GitHub

Detects Effects returned from non-Effect-aware Vitest callbacks

PropertyValue
CategoryCorrectness
Default severityerror
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377105
Language Service namefloatingEffectInVitest
Oxlint nameeffecttsgo/floating-effect-in-vitest

Preview

import { it } from "@effect/vitest"
import { Effect } from "effect"

it("does not execute", () => Effect.void)
/**
                             ^^^^^^^^^^^ effecttsgo(floating-effect-in-vitest): This Vitest callback returns an Effect that Vitest does not run. Use an Effect-aware test API or run the Effect with Effect.runPromise.
*/

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": {
          "floatingEffectInVitest": "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/floating-effect-in-vitest": "warn"
  }
}