{"name":"eslint-import-resolver-next","version":"0.6.0","type":"module","main":"./lib/index.cjs","module":"./lib/index.js","types":"./lib/index.d.ts","exports":{"types":"./lib/index.d.ts","import":"./lib/index.js","require":"./lib/index.cjs"},"sideEffects":false,"description":"The next resolver for `eslint-plugin-import` or `eslint-plugin-import-x`","keywords":["eslint","eslint-plugin-import","eslint-plugin-import-x","eslint-import-resolver","oxc-resolver","unrs-resolver"],"repository":{"type":"git","url":"git+https://github.com/kuoruan/eslint-import-resolver-next.git"},"license":"MIT","engines":{"node":">=14.18.0"},"dependencies":{"is-bun-module":"^2.0.0","js-yaml":"^4.1.0","stable-hash":"^0.0.5","tinyglobby":"^0.2.13","unrs-resolver":"^1.7.2"},"devDependencies":{"@babel/eslint-parser":"^7.27.1","@eslint/js":"^9.26.0","@rollup/plugin-typescript":"^12.1.2","@types/js-yaml":"^4.0.9","@types/mock-fs":"^4.13.4","@types/node":"^22.15.17","eslint":"^9.26.0","eslint-config-prettier":"^10.1.3","eslint-plugin-prettier":"^5.4.0","eslint-plugin-simple-import-sort":"^12.1.1","globals":"^16.1.0","mock-fs":"^5.5.0","prettier":"^3.5.3","rollup":"^4.40.2","rollup-plugin-node-externals":"^8.0.0","typescript":"^5.8.3","typescript-eslint":"^8.32.0","typescript-transform-paths":"^3.5.5","vitest":"^3.1.3"},"scripts":{"test":"vitest --run","build":"rollup -c","lint":"eslint .","lint:fix":"eslint --fix ."},"_id":"eslint-import-resolver-next@0.6.0","bugs":{"url":"https://github.com/kuoruan/eslint-import-resolver-next/issues"},"homepage":"https://github.com/kuoruan/eslint-import-resolver-next#readme","_integrity":"sha512-W+40rkKo50tmOVvB59RkJHKoqWfBywvJe+c+8NZ7WhoCk68ol9JWmbXXv1i0Y9+74xWcMm2ECObx8tMfjnMtlw==","_resolved":"/tmp/e1e841be253e5562e3c9901d653d4c7e/eslint-import-resolver-next-0.6.0.tgz","_from":"file:eslint-import-resolver-next-0.6.0.tgz","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-W+40rkKo50tmOVvB59RkJHKoqWfBywvJe+c+8NZ7WhoCk68ol9JWmbXXv1i0Y9+74xWcMm2ECObx8tMfjnMtlw==","shasum":"249620d25967ee16e0b6f20a5bba1260d50cff22","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-next/download/eslint-import-resolver-next-0.6.0.tgz","fileCount":12,"unpackedSize":63082,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-import-resolver-next@0.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCXun4NX08WKDTbYLs8IBH6T+l+j2JK+texGdEO3GvAawIgFw7ApRQPPtobnMFWOVKm9tTN/wogNfjWYlq0wNhzFNk="}],"size":10248,"noattachment":false,"key":"/eslint-import-resolver-next/-/eslint-import-resolver-next-0.6.0.tgz"},"_npmUser":{"name":"kuoruan","email":"kuoruan@gmail.com"},"directories":{},"maintainers":[{"name":"kuoruan","email":"kuoruan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-import-resolver-next_0.6.0_1746781756798_0.8235955834595654"},"_hasShrinkwrap":false,"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":1746781757025,"_cnpm_publish_time":1746781757025,"dist-tags":{"latest":"0.6.0"}}