{"name":"eslint-import-resolver-next","version":"0.2.2","license":"MIT","_id":"eslint-import-resolver-next@0.2.2","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":"d8482068910313ada39e56f5226941af78f209d6","tarball":"http://registry-npm.ywwl.com/eslint-import-resolver-next/download/eslint-import-resolver-next-0.2.2.tgz","fileCount":10,"integrity":"sha512-1Erx089eZRi39KJhe72P/jqoiFcNkMvkvhLRSVgzCQz1iy+GFb7Y+ishyGXbbKdxqSp+RncYbBSvlKKW0WSyZQ==","signatures":[{"sig":"MEUCIQC4KnNNaWvuMFdI0TIs2tD8Rvn3Q8VcUnOrq3EL5UjVBQIgANXnhCRdFCYT0TMa3nt/HzQhsBrgIhIMEBxG1/15uBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/eslint-import-resolver-next@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31504,"size":6207,"noattachment":false,"key":"/eslint-import-resolver-next/-/eslint-import-resolver-next-0.2.2.tgz"},"main":"./lib/index.cjs","type":"module","_from":"file:eslint-import-resolver-next-0.2.2.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/87cfa07cc5d8b111aff56210b783deb3/eslint-import-resolver-next-0.2.2.tgz","_integrity":"sha512-1Erx089eZRi39KJhe72P/jqoiFcNkMvkvhLRSVgzCQz1iy+GFb7Y+ishyGXbbKdxqSp+RncYbBSvlKKW0WSyZQ==","repository":{"url":"git+https://github.com/kuoruan/eslint-import-resolver-next.git","type":"git"},"_npmVersion":"10.7.0","description":"The next resolver for `eslint-plugin-import` or `eslint-plugin-import-x`","directories":{},"_nodeVersion":"18.20.4","dependencies":{"js-yaml":"^4.1.0","fast-glob":"^3.3.2","get-tsconfig":"^4.8.1","oxc-resolver":"^2.0.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.15.0","rollup":"^4.27.2","vitest":"^2.1.5","globals":"^15.12.0","prettier":"^3.3.1","@eslint/js":"^9.15.0","typescript":"^5.6.3","@types/node":"^22.9.0","@types/js-yaml":"^4.0.9","@types/eslint__js":"^8.42.3","typescript-eslint":"^8.14.0","@babel/eslint-parser":"^7.24.7","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@rollup/plugin-typescript":"^12.1.1","rollup-plugin-node-externals":"^7.1.3","eslint-plugin-simple-import-sort":"^12.1.1"},"_npmOperationalInternal":{"tmp":"tmp/eslint-import-resolver-next_0.2.2_1731935620631_0.21829581293767397","host":"s3://npm-registry-packages"},"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":1731935620830,"_cnpm_publish_time":1731935620830,"dist-tags":{"latest":"0.6.0"}}