Skip to content

Commit 5bb563c

Browse files
authored
prefer-node-protocol: Mention Node.js version support in docs (#1874)
1 parent 4dcf1e4 commit 5bb563c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/rules/prefer-node-protocol.md

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99

1010
When importing builtin modules, it's better to use the [`node:` protocol](https://nodejs.org/api/esm.html#node-imports) as it makes it perfectly clear that the package is a Node.js builtin module.
1111

12+
Note that Node.js support for this feature began in:
13+
14+
> v16.0.0, v14.18.0 (`require()`)
15+
>
16+
> v14.13.1, v12.20.0 (`import`)
17+
1218
## Fail
1319

1420
```js

0 commit comments

Comments
 (0)