processEnv

August 4, 2026 ยท View on GitHub

Warns when reading process.env outside Effect generators instead of using Effect Config

PropertyValue
CategoryEffect-native
Default severityoff
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377076
Language Service nameprocessEnv
Oxlint nameeffecttsgo/process-env

Preview

/// <reference types="node" />

export const preview = process.env.PORT
/**
                       ^^^^^^^^^^^^^^^^ effecttsgo(process-env): This code reads from `process.env`, environment configuration 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": {
          "processEnv": "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": "warn"
  }
}