Comments (3)
same as this: #1931
Apparently, it's not.
from eslint-plugin-unicorn.
I can't find any mention of bun:
protocol on https://bun.sh/, is it a builtin protocol?
from eslint-plugin-unicorn.
@fisker I get this same error with bun:test
too (Bun's test runner); it expects node:bun:test
which doesn't make any sense.
I'm not really sure bun:
is a protocol, rather it's kind of a namespace, kind of not. For example, here are many of Bun's native APIs: https://bun.sh/docs/runtime/bun-apis
Let's use the Glob
API as an example. As you can see, it's written as Bun.Glob
implying that it only exists as a member of the Bun
global variable. However, if you click into the details of the Glob API (https://bun.sh/docs/api/glob), you can see it can also be used as an import: import { Glob } from "bun";
. In other words, accessing APIs via imports or via the global Bun
variable are interchangeable. Jarred Sumner (Bun's creator) has stated this as fact a few times in the past. So this ESLint plugin should not be treating bun
, bun:test
, bun:jsc
, or any other Bun imports as being Node.js imports.
from eslint-plugin-unicorn.
Related Issues (20)
- no-array-for-each autofix is unsafe for sparse arrays HOT 2
- `unicorn/prefer-at` incorrectly fixes object property key lookup
- Rule proposal: `prefer-logical-operator-over-ternary` for explicit truthy, falsy and nullish conditions HOT 2
- `unicorn/prefer-spread` treats `string.slice(0)` like an array HOT 2
- Rule proposal: no inline callbacks before other parameters HOT 2
- no-negated-condition extra `ignore undefined` option. HOT 1
- In v50.0.0 , lodash dependency is missing HOT 2
- Rule proposal: `prefer-array-find-last` HOT 1
- Export types for use in flat configs
- `unicorn/explicit-length-check` does not report when optional chaining
- `unicorn/no-invalid-remove-event-listener` does not report when optional chaining
- Support `import.meta.dirname` and `import.meta.filename` in `prefer-module` rule HOT 5
- Rule proposal: `no-single-promise-in-promise-methods` HOT 2
- Rule proposal: `no-await-in-promise-methods` HOT 2
- Rule proposal: `no-anonymous-default-export` HOT 2
- `error-message` believes that a joined array is empty when elements are conditionally pushed
- Consider remove autofixing unicorn/prevent-abbreviations HOT 5
- False positive for consistent-destructuring HOT 1
- Rule proposal: avoid loops to create `URLSearchParams` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-unicorn.