---
url: /docs/guide/usage/linter/rules/unicorn/prefer-node-protocol.md
---

### What it does

Prefer using the `node:` protocol when importing Node.js built-in modules.

### Why is this bad?

Node.js built-in modules should be imported using the `node:` protocol to avoid ambiguity with local modules.

### Examples

Examples of **incorrect** code for this rule:

```javascript
import fs from "fs";
```

Examples of **correct** code for this rule:

```javascript
import fs from "node:fs";
```

## How to use

## Version

This rule was added in v0.0.19.

## References
