We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
prefer-node-protocol
bun:*
1 parent 8a2e7db commit 43fc638Copy full SHA for 43fc638
rules/prefer-node-protocol.js
@@ -33,6 +33,7 @@ const create = () => ({
33
typeof value !== 'string'
34
|| value.startsWith('node:')
35
|| !isBuiltinModule(value)
36
+ || !isBuiltinModule(`node:${value}`)
37
) {
38
return;
39
}
test/prefer-node-protocol.mjs
@@ -25,6 +25,10 @@ test.snapshot({
25
26
`,
27
'import "punycode/";',
28
+ // https://bun.sh/docs/runtime/bun-apis
29
+ 'import "bun";',
30
+ 'import "bun:jsc";',
31
+ 'import "bun:sqlite";',
32
],
invalid: [
'import fs from "fs";',
0 commit comments