Rules
no-node-imports
Prefer Effect Platform services over direct Node built-ins.
Purpose and behavior
Prefer Effect Platform services over direct Node built-ins.
The rule checks static imports and re-exports beginning with node:. The allowlist matches exact names after node:, so fs does not allow fs/promises. The rule ignores bare fs, dynamic imports and require calls.
Options
Without options, the rule allows no node: imports. Set a string array, { allow: string[] } or { allowed: string[] }. The rule combines allow and allowed. Example: ["error", { "allow": ["path", "fs/promises"] }].
Invalid example
import { readFile } from 'node:fs/promises'Valid example
import { Effect } from 'effect'Fixes and exceptions
This rule provides no automatic fix. Rewrite the code to preserve its intended behavior.
For a boundary exception, use oxlint-disable-next-line rules/no-node-imports -- reason. Examples cover this rule only and may omit imports or declarations.
Source and tests
Enabled by the Effect preset.