Skip to content

Commit

Permalink
refactor: remove is-builtin-module dep
Browse files Browse the repository at this point in the history
  • Loading branch information
zanminkian committed Oct 10, 2024
1 parent 2b469be commit 9b199ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions rules/prefer-node-protocol.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const isBuiltinModule = require('is-builtin-module');
const module = require('node:module');
const {replaceStringLiteral} = require('./fix/index.js');
const isStaticRequire = require('./ast/is-static-require.js');

Expand Down Expand Up @@ -33,7 +33,7 @@ const create = () => ({
typeof value !== 'string'
|| value.startsWith('node:')
|| /^bun(?::|$)/.test(value)
|| !isBuiltinModule(value)
|| !module.isBuiltin(value)
) {
return;
}
Expand Down

0 comments on commit 9b199ca

Please sign in to comment.