NO

Node.js Modern Built-ins

Prefer native Node.js APIs over third-party packages

Details

Language / Topic
nodejsNode.js
Category
Style Guide

Rules

balanced
- Use `--env-file` instead of `dotenv` for loading environment variables.
- Use native `fetch()` instead of `axios` or `node-fetch`.
- Use `node:` prefix for all built-in modules (`node:fs`, `node:path`, `node:crypto`).
- Use `fs/promises` over callback-based `fs` APIs.
- Use `structuredClone()` instead of `JSON.parse(JSON.stringify())`.
- Use `crypto.randomUUID()` instead of `uuid` package.
- Use `AbortController` for cancellable operations.
- Use `node:util.parseArgs()` instead of `commander`/`yargs` for simple CLIs.
- Use `node:worker_threads` for CPU-intensive tasks.
- Use `node:stream/promises` pipeline for stream processing.
- Prefer top-level `await` in ESM modules.
- Use `--experimental-strip-types` (Node 22+) for direct TypeScript execution.