{"name":"eslint-import-resolver-next","version":"0.4.3","keywords":["eslint","eslint-plugin-import","eslint-plugin-import-x","eslint-import-resolver","oxc-resolver"],"license":"MIT","_id":"eslint-import-resolver-next@0.4.3","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":"05e9d74007bc1c7b6f9d94822b21d571a61617f1","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-next/download/eslint-import-resolver-next-0.4.3.tgz","fileCount":12,"integrity":"sha512-9PV5hdtDQyiZuwtWRenbknKSBgYxYC5m8AQW7FbYWkmTmXJn9QkHHNOc9WgFzroyig7Qod5OD+s23WGFA5g8FQ==","signatures":[{"sig":"MEQCIEn0tOhL0zyUr1Cyp4NtdqVd8GvyEjb88r4imiBYZG8dAiB9KoORS575vZckiSbp8utgR2pkfQ7wOp+RyO+H0b80FQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-import-resolver-next@0.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47667,"size":8118,"noattachment":false,"key":"/eslint-import-resolver-next/-/eslint-import-resolver-next-0.4.3.tgz"},"main":"./lib/index.cjs","type":"module","_from":"file:eslint-import-resolver-next-0.4.3.tgz","types":"./lib/index.d.ts","module":"./lib/index.js","engines":{"node":">=14"},"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/7997af782003b0f21153e6520edb11fe/eslint-import-resolver-next-0.4.3.tgz","_integrity":"sha512-9PV5hdtDQyiZuwtWRenbknKSBgYxYC5m8AQW7FbYWkmTmXJn9QkHHNOc9WgFzroyig7Qod5OD+s23WGFA5g8FQ==","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","fast-glob":"^3.3.3","stable-hash":"^0.0.5","oxc-resolver":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.22.0","rollup":"^4.35.0","vitest":"^3.0.8","globals":"^16.0.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","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.4.3_1742220180115_0.5273161095594656","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":1742220180288,"_cnpm_publish_time":1742220180288,"dist-tags":{"latest":"0.6.0"}}