nodeBuiltinImport
August 4, 2026 ยท View on GitHub
Warns when importing Node.js built-in modules that have Effect-native counterparts
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377057 |
| Language Service name | nodeBuiltinImport |
| Oxlint name | effecttsgo/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"
}
}