globalTimers
August 4, 2026 ยท View on GitHub
Warns when using setTimeout/setInterval outside Effect generators instead of Effect.sleep/Schedule
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377072 |
| Language Service name | globalTimers |
| Oxlint name | effecttsgo/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"
}
}