diff --git a/package.json b/package.json index 0902c2efde..6a61aced06 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "esquery": "^1.6.0", "globals": "^15.9.0", "indent-string": "^4.0.0", - "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", diff --git a/rules/prefer-node-protocol.js b/rules/prefer-node-protocol.js index 398d5684af..501a3e71c3 100644 --- a/rules/prefer-node-protocol.js +++ b/rules/prefer-node-protocol.js @@ -1,5 +1,5 @@ 'use strict'; -const isBuiltinModule = require('is-builtin-module'); +const {isBuiltin} = require('node:module'); const {replaceStringLiteral} = require('./fix/index.js'); const isStaticRequire = require('./ast/is-static-require.js'); @@ -33,7 +33,7 @@ const create = () => ({ typeof value !== 'string' || value.startsWith('node:') || /^bun(?::|$)/.test(value) - || !isBuiltinModule(value) + || !isBuiltin(value) ) { return; }