globalTimers

August 4, 2026 ยท View on GitHub

Warns when using setTimeout/setInterval outside Effect generators instead of Effect.sleep/Schedule

PropertyValue
CategoryEffect-native
Default severityoff
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377072
Language Service nameglobalTimers
Oxlint nameeffecttsgo/global-timers

Preview

setTimeout(() => {}, 100)
/**
^^^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(global-timers): This code uses `setTimeout`, the corresponding Effect timer API is `Effect.sleep or Schedule` from Effect.
*/

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": {
          "globalTimers": "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-timers": "warn"
  }
}