processEnvInEffect
August 4, 2026 ยท View on GitHub
Warns when reading process.env inside Effect generators instead of using Effect Config
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377077 |
| Language Service name | processEnvInEffect |
| Oxlint name | effecttsgo/process-env-in-effect |
Preview
/// <reference types="node" />
import { Effect } from "effect"
export const preview = Effect.gen(function*() {
return process.env.PORT
/**
^^^^^^^^^^^^^^^^ effecttsgo(process-env-in-effect): This Effect code reads from `process.env`, environment configuration in Effect code is represented through `Config` 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": {
"processEnvInEffect": "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/process-env-in-effect": "warn"
}
}