{"id":14155312,"url":"https://github.com/opsbr/eslint-import-resolver-typescript-bun","last_synced_at":"2025-08-09T07:20:41.600Z","repository":{"id":177952393,"uuid":"661116434","full_name":"opsbr/eslint-import-resolver-typescript-bun","owner":"opsbr","description":"This plugin simply adds workarounds to eslint-import-resolver-typescript when resolving Bun's modules.","archived":false,"fork":false,"pushed_at":"2024-11-25T08:56:04.000Z","size":857,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T16:43:09.489Z","etag":null,"topics":["bun","eslint","eslint-plugin-import","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-import-resolver-typescript-bun","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opsbr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-01T20:57:28.000Z","updated_at":"2025-03-23T05:53:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd9dd1b8-eca5-4309-83f6-ae9a2825733d","html_url":"https://github.com/opsbr/eslint-import-resolver-typescript-bun","commit_stats":null,"previous_names":["opsbr/eslint-import-resolver-typescript-bun"],"tags_count":105,"template":false,"template_full_name":null,"purl":"pkg:github/opsbr/eslint-import-resolver-typescript-bun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsbr%2Feslint-import-resolver-typescript-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsbr%2Feslint-import-resolver-typescript-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsbr%2Feslint-import-resolver-typescript-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsbr%2Feslint-import-resolver-typescript-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opsbr","download_url":"https://codeload.github.com/opsbr/eslint-import-resolver-typescript-bun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opsbr%2Feslint-import-resolver-typescript-bun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262026903,"owners_count":23246952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","eslint","eslint-plugin-import","typescript"],"created_at":"2024-08-17T08:02:49.239Z","updated_at":"2025-06-26T08:03:51.627Z","avatar_url":"https://github.com/opsbr.png","language":"TypeScript","funding_links":[],"categories":["typescript"],"sub_categories":[],"readme":"# eslint-import-resolver-typescript-bun\n\n[![GitHub Actions](https://github.com/opsbr/eslint-import-resolver-typescript-bun/workflows/release/badge.svg)](https://github.com/import-js/eslint-import-resolver-typescript/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/eslint-import-resolver-typescript-bun.svg)](https://www.npmjs.com/package/eslint-import-resolver-typescript-bun)\n[![GitHub Release](https://img.shields.io/github/release/opsbr/eslint-import-resolver-typescript-bun)](https://github.com/opsbr/eslint-import-resolver-typescript-bun/releases)\n\n[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![projen](https://img.shields.io/badge/maintained%20with-projen-ED9C50.svg)](https://github.com/projen/projen)\n\nThis plugin simply adds workarounds to [`eslint-import-resolver-typescript`](https://www.npmjs.com/package/eslint-import-resolver-typescript) when resolving [Bun](https://bun.sh/)'s modules.\n\nYou can use [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) on your Bun project directly with this resolver!\n\n## How it works\n\nThis resolver reads [`bun-types`](https://www.npmjs.com/package/bun-types) and list all Bun modules defined there. Currently, we assume all Bun modules start with `bun` e.g. `bun`, `bun:test`, etc.\n\nThen, when resolving, if the requested module is one of the Bun modules detected above, the resolver returns `{ found: true, path: null }`. Otherwise, it delegates to `eslint-import-resolver-typescript`.\n\n## Installation\n\n```shell\n# npm\nnpm i -D eslint-plugin-import eslint-import-resolver-typescript-bun\n\n# pnpm\npnpm i -D eslint-plugin-import eslint-import-resolver-typescript-bun\n\n# yarn\nyarn add -D eslint-plugin-import eslint-import-resolver-typescript-bun\n```\n\n## Configuration\n\nAll configurations are passed to `eslint-import-resolver-typescript`. Simply replace your resolver name from `typescript` to `typescript-bun`!\n\n```javascript\nmodule.exports = {\n  extends: [\"plugin:import/recommended\", \"plugin:import/typescript\"],\n  parser: \"@typescript-eslint/parser\",\n  parserOptions: {\n    project: true,\n  },\n  plugins: [\"@typescript-eslint\"],\n  root: true,\n  settings: {\n    \"import/parsers\": {\n      \"@typescript-eslint/parser\": [\".ts\", \".tsx\"],\n    },\n    \"import/resolver\": {\n      \"typescript-bun\": {\n        // ^^ HERE! ^^\n        project: true,\n        alwaysTryTypes: true,\n      },\n    },\n  },\n  rules: {\n    \"import/order\": [\n      \"warn\",\n      {\n        groups: [\"builtin\", \"external\"],\n        alphabetize: {\n          order: \"asc\",\n          caseInsensitive: true,\n        },\n      },\n    ],\n  },\n};\n```\n\nSee `eslint-import-resolver-typescript` configuration [here](https://github.com/import-js/eslint-import-resolver-typescript/tree/master#configuration).\n\n## Debug\n\nUse `DEBUG` environment variable provided by [`debug`](https://www.npmjs.com/package/debug):\n\n```\n$ DEBUG=eslint-import-resolver-typescript\\* bun x eslint src/index.ts\n  eslint-import-resolver-typescript looking for: bun-types +0ms\n  eslint-import-resolver-typescript matched node path: /workspaces/asideline/node_modules/bun-types/types.d.ts +101ms\n  eslint-import-resolver-typescript-bun found bun modules: Set(5) { 'bun', 'bun:test', 'bun:sqlite', 'bun:jsc', 'bun:ffi' } +0ms\n  eslint-import-resolver-typescript-bun matched bun modules: bun:test +2ms\n```\n\n## Development\n\nThis project uses [Projen](https://github.com/projen/projen) and [Yarn 1](https://yarnpkg.com/).\n\n```shell\ngit clone https://github.com/opsbr/eslint-import-resolver-typescript-bun.git\ncd eslint-import-resolver-typescript-bun\nyarn install\nyarn build\n```\n\n## Acknowledgement\n\n- [`eslint-import-resolver-typescript`](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n- [`bun-types`](https://www.npmjs.com/package/bun-types)\n\n## Author\n\n[OpsBR Software Technology Inc.](https://opsbr.com/)\n\n## License\n\n[Apache-2.0](https://github.com/opsbr/eslint-import-resolver-typescript-bun/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsbr%2Feslint-import-resolver-typescript-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopsbr%2Feslint-import-resolver-typescript-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopsbr%2Feslint-import-resolver-typescript-bun/lists"}