Warns when using console methods inside Effect generators instead of Effect.log/Logger
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377065 |
| Language Service name | globalConsoleInEffect |
| Oxlint name | effecttsgo/global-console-in-effect |
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`.
*/
})See the Language Service setup guide for installation instructions.
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"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "globalConsoleInEffect": "warning" } } ] } }