nodeBuiltinImport

August 4, 2026 ยท View on GitHub

Warns when importing Node.js built-in modules that have Effect-native counterparts

PropertyValue
CategoryEffect-native
Default severityoff
FixableNo
Effect versionsv3, v4
Diagnostic codesTS377057
Language Service namenodeBuiltinImport
Oxlint nameeffecttsgo/node-builtin-import

Preview

import fs from "node:fs"
/**
               ^^^^^^^^^ effecttsgo(node-builtin-import): This module reference uses the `fs` module, the corresponding Effect API is `FileSystem` from `@effect/platform`.
*/

export const preview = fs.readFileSync

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": {
          "nodeBuiltinImport": "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/node-builtin-import": "warn"
  }
}