globalConsoleInEffect

August 4, 2026 ยท View on GitHub

Warns when using console methods inside Effect generators instead of Effect.log/Logger

PropertyValue
CategoryEffect-native
Default severityoff
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377065
Language Service nameglobalConsoleInEffect
Oxlint nameeffecttsgo/global-console-in-effect

Preview

import { Effect } from "effect"

export const preview = Effect.gen(function*() {
  console.log("hello")
/**
  ^^^^^^^^^^^^^^^^^^^^ effecttsgo(global-console-in-effect): This Effect code uses `console.log`, logging in Effect code is represented through `Effect.log or Logger`.
*/
})

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": {
          "globalConsoleInEffect": "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/global-console-in-effect": "warn"
  }
}