{"name":"eslint-import-resolver-next","version":"0.5.0","keywords":["eslint","eslint-plugin-import","eslint-plugin-import-x","eslint-import-resolver","oxc-resolver"],"license":"MIT","_id":"eslint-import-resolver-next@0.5.0","maintainers":[{"name":"kuoruan","email":"kuoruan@gmail.com"}],"homepage":"https://github.com/kuoruan/eslint-import-resolver-next#readme","bugs":{"url":"https://github.com/kuoruan/eslint-import-resolver-next/issues"},"dist":{"shasum":"07e2f28609e33808c413a5c3e921366e2f00f434","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-next/download/eslint-import-resolver-next-0.5.0.tgz","fileCount":12,"integrity":"sha512-EudNKo7MfvpXJIoVs+woUZHdOUHmH2UZjos9cBKxtvt7/ywVc9+gNch0OzOq+v2rOWRhyVHuphzjppVCc2W1lQ==","signatures":[{"sig":"MEUCICxlYbYejVeqfuiRfSoFaP2SAagNOlTzMRb3XQYOxJvmAiEA8pWdYT0VlHehsNzVRx44Z8poaYTdHgOUsVbIaXykSs0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-import-resolver-next@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58455,"size":9616,"noattachment":false,"key":"/eslint-import-resolver-next/-/eslint-import-resolver-next-0.5.0.tgz"},"main":"./lib/index.cjs","type":"module","_from":"file:eslint-import-resolver-next-0.5.0.tgz","types":"./lib/index.d.ts","module":"./lib/index.js","engines":{"node":">=14.18.0"},"exports":{"types":"./lib/index.d.ts","import":"./lib/index.js","require":"./lib/index.cjs"},"scripts":{"lint":"eslint .","test":"vitest --run","build":"rollup -c","lint:fix":"eslint --fix ."},"_npmUser":{"name":"kuoruan","email":"kuoruan@gmail.com"},"_resolved":"/tmp/e58243d6079ad29eb1ddeae18273315b/eslint-import-resolver-next-0.5.0.tgz","_integrity":"sha512-EudNKo7MfvpXJIoVs+woUZHdOUHmH2UZjos9cBKxtvt7/ywVc9+gNch0OzOq+v2rOWRhyVHuphzjppVCc2W1lQ==","repository":{"url":"git+https://github.com/kuoruan/eslint-import-resolver-next.git","type":"git"},"_npmVersion":"10.8.2","description":"The next resolver for `eslint-plugin-import` or `eslint-plugin-import-x`","directories":{},"sideEffects":false,"_nodeVersion":"18.20.7","dependencies":{"js-yaml":"^4.1.0","tinyglobby":"^0.2.12","stable-hash":"^0.0.5","oxc-resolver":"^5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.22.0","rollup":"^4.36.0","vitest":"^3.0.9","globals":"^16.0.0","mock-fs":"^5.5.0","prettier":"^3.5.3","@eslint/js":"^9.22.0","typescript":"^5.8.2","@types/node":"^22.13.10","@types/js-yaml":"^4.0.9","@types/mock-fs":"^4.13.4","typescript-eslint":"^8.26.1","@babel/eslint-parser":"^7.26.10","eslint-config-prettier":"^10.1.1","eslint-plugin-prettier":"^5.2.3","@rollup/plugin-typescript":"^12.1.2","typescript-transform-paths":"^3.5.5","rollup-plugin-node-externals":"^8.0.0","eslint-plugin-simple-import-sort":"^12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/eslint-import-resolver-next_0.5.0_1742527614103_0.9814485689092558","host":"s3://npm-registry-packages-npm-production"},"readme":"# eslint-import-resolver-next\n\n[![npm](https://img.shields.io/npm/v/eslint-import-resolver-next.svg)](https://www.npmjs.com/package/eslint-import-resolver-next)\n[![npm](https://img.shields.io/npm/dw/eslint-import-resolver-next.svg)](https://www.npmjs.com/package/eslint-import-resolver-next)\n[![npm](https://img.shields.io/npm/l/eslint-import-resolver-next.svg)](https://www.npmjs.com/package/eslint-import-resolver-next)\n\nThe next resolver plugin for [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) or [`eslint-plugin-import-x`](https://www.npmjs.com/package/eslint-plugin-import-x) that resolves modules with [`unrs-resolver`](https://github.com/unrs/unrs-resolver).\n\n## Features\n\n- Resolves modules using the [`unrs-resolver`](https://github.com/unrs/unrs-resolver) package.\n- Support mono-repos and `pnpm-workspaces.yaml`.\n- Support paths alias defined in `tsconfig.compilerOptions.paths` or `jsconfig.compilerOptions.paths`.\n\n## Usage\n\n1. Install the package:\n\n```sh\nnpm install -D eslint-import-resolver-next\n```\n\n2. Add it as a resolver to your ESLint configuration.\n\nExample config:\n\n```js\nmodule.exports = {\n  // ... other configuration options\n  settings: {\n    \"import/resolver\": {\n      next: {\n        // Options for the resolver\n      },\n    },\n  },\n};\n```\n\nwith Mono-repo:\n\n```js\nmodule.exports = {\n  // ... other configuration options\n  settings: {\n    \"import/resolver\": {\n      next: {\n        packages: [\"packages/*\"],\n      },\n    },\n  },\n};\n```\n\npnpm-workspaces:\n\n```js\nmodule.exports = {\n  // ... other configuration options\n  settings: {\n    \"import/resolver\": {\n      next: {\n        packages: {\n          pnpmWorkspace: true,\n          includeRoot: true,\n        },\n      },\n    },\n  },\n};\n```\n\n3. For [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x/) `resolver-next`\n\n```js\nconst { createNextImportResolver } = require(\"eslint-import-resolver-next\");\n\nmodule.exports = {\n  // ... other configuration options\n  settings: {\n    \"import-x/resolver-next\": [createNextImportResolver({\n      // Options for the resolver\n    })],\n  },\n};\n```\n\n## Options\n\n- `roots` (Array<string>): The directories to search for modules. Default: `[process.cwd()]`.\n\n- `alias` (Record<string, string | string[]>): The paths alias. Default: `undefined`.\n  * The alias can be set as relative paths. relative paths are resolved from the package directory.\n\n- `tsconfig` (boolean | string | object): Weather to use the `tsconfig.json` file. Default: `true`.\n  * If `true`, the resolver will try to find the `tsconfig.json` file close to the source file.\n  * If a string, it's the name of the file to search for or the absolute path to the file.\n  * If an object, see `ConfigFileOptions`.\n\n- `jsconfig` (boolean | string | object): Weather to use the `jsconfig.json` file. Default: `true`.\n  * If `true`, the resolver will try to find the `jsconfig.json` file close to the source file.\n  * If a string, it's the name of the file to search for or the absolute path to the file.\n  * If an object, see `ConfigFileOptions`.\n\n- `packages` (string[] | PackageOptions): The patterns or options to search for packages. Default: `undefined`.\n  * If an array, the resolver will search for packages in the specified patterns.\n  * If an object, see `PackageOptions`.\n\n- `bun` (boolean): Weather to enable the `bun` support. Default: `true` if bun environment is detected.\n  * If `true`, the resolver will try to resolve bun built-in modules.\n\nAll other options are passed to the `unrs-resolver` package. See the [unrs-resolver documentation](https://github.com/unrs/unrs-resolver#options)\n\n### ConfigFileOptions\n\nThe `tsconfig` and `jsconfig` options can have the following properties:\n\n- `configFile` (string): The name of the file to search for or the absolute path to the file. Default: `tsconfig.json`.\n- `ignore` (string[]): The directories to ignore. Default: `[\"**/node_modules/**\"]`.\n- `references` ('auto' | string[]): Support for Typescript Project References. Default: `'auto'`.\n  * If `'auto'`, the resolver will try to find the `references` field in the `tsconfig.json` file.\n  * If an array, the resolver will use the specified references.\n\n### PackageOptions\n\nA folder with a `package.json` file is considered a package. The `PackageOptions` object can have the following properties:\n\n- `patterns` (string[]): The patterns to search for packages. Default: `[\".\"]`.\n- `ignore` (string[]): The directories to ignore. Default: `[\"**/node_modules/**\", \"**/bower_components/**\", \"**/test/**\", \"**/tests/**\"]`.\n- `includeRoot` (boolean): Weather to include the root directory. Default: `false`.\n- `pnpmWorkspace` (boolean | string): Weather to use the `pnpm-workspace.yaml` file to find packages. Default: `false`.\n  * If `true`, the resolver will try to find the `pnpm-workspace.yaml` file in the package directory.\n  * If a string, define the path to the `pnpm-workspace.yaml` file.\n","publish_time":1742527614257,"_cnpm_publish_time":1742527614257,"dist-tags":{"latest":"0.6.0"}}