opsbr / eslint-import-resolver-typescript-bun

This plugin simply adds workarounds to eslint-import-resolver-typescript when resolving Bun's modules.
https://www.npmjs.com/package/eslint-import-resolver-typescript-bun
Apache License 2.0
8 stars 0 forks source link

Types for `bun-types` changed #88

Open marvinside opened 6 months ago

marvinside commented 6 months ago

bun-types changed the Structure of their types.

Last working Version: bun-types@1.0.25 Broken Version: bun-types@1.0.26 and all further versions.

The types are now split into multiple files, there is now a index.d.ts file with the following content:

// Project: https://github.com/oven-sh/bun
// Definitions by: Jarred Sumner <https://github.com/Jarred-Sumner>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference lib="esnext" />
/// <reference types="node" />
/// <reference types="ws" />

// contributors: uncomment this to detect conflicts with lib.dom.d.ts
/// <reference lib="dom" />

/// <reference path="./globals.d.ts" />
/// <reference path="./bun.d.ts" />
/// <reference path="./ffi.d.ts" />
/// <reference path="./test.d.ts" />
/// <reference path="./html-rewriter.d.ts" />
/// <reference path="./jsc.d.ts" />
/// <reference path="./sqlite.d.ts" />
/// <reference path="./wasm.d.ts" />
/// <reference path="./deprecated.d.ts" />
vitch commented 5 months ago

This is blocking me from being able to use this project so I might try to take a look into it if no-one else is?

Checked out the repo and see a yarn.lock with yarn lockfile v1 - anyone know what version of yarn is preferred to develop it?

vitch commented 5 months ago

Although for now I'm working around it without this plugin by manually including the bun: imports I'm using:

{
  // within eslintrc.js
  "settings": {
    "import/core-modules": ["bun:test"],
  },
}