diff --git a/docs/rules/prefer-node-protocol.md b/docs/rules/prefer-node-protocol.md index 2cf3227a7d..bb5350cad1 100644 --- a/docs/rules/prefer-node-protocol.md +++ b/docs/rules/prefer-node-protocol.md @@ -1,15 +1,19 @@ # Prefer using the `node:` protocol when importing Node.js builtin modules - - -✅ *This rule is part of the [recommended](https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config) config.* +💼 This rule is enabled in the ✅ `recommended` [config](https://github.com/sindresorhus/eslint-plugin-unicorn#preset-configs). -🔧 *This rule is [auto-fixable](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).* - +🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix). + + + 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. -And don't forget to [upvote this issue](https://github.com/nodejs/node/issues/38343) if you agree. +Note that Node.js support for this feature began in: + +> v16.0.0, v14.18.0 (`require()`) +> +> v14.13.1, v12.20.0 (`import`) ## Fail