{"_id":"@daveydave856/eslint-import-resolver-typescript","name":"@daveydave856/eslint-import-resolver-typescript","dist-tags":{"latest":"3.6.2"},"versions":{"3.6.2":{"name":"@daveydave856/eslint-import-resolver-typescript","version":"3.6.2","type":"module","description":"This plugin adds `TypeScript` support to `eslint-plugin-import`","repository":{"type":"git","url":"git+https://github.com/import-js/eslint-import-resolver-typescript.git"},"author":{"name":"Alex Gorbatchev","email":"alex.gorbatchev@gmail.com"},"contributors":[{"name":"JounQin","email":"admin@1stg.me","url":"https://www.1stG.me"}],"funding":"https://opencollective.com/unts/projects/eslint-import-resolver-ts","license":"ISC","packageManager":"yarn@4.0.2","engines":{"node":"^14.18.0 || >=16.0.0"},"main":"lib/index.cjs","module":"lib/index.js","exports":{".":{"types":"./lib/index.d.ts","es2020":"./lib/index.es2020.mjs","fesm2020":"./lib/index.es2020.mjs","import":"./lib/index.js","require":"./lib/index.cjs"},"./package.json":"./package.json"},"es2020":"lib/index.es2020.mjs","fesm2020":"lib/index.es2020.mjs","types":"lib/index.d.ts","keywords":["typescript","eslint","import","resolver","plugin"],"scripts":{"build":"run-p 'build:*'","build:r":"r -f cjs,es2020","build:ts":"tsc -b","lint":"run-p 'lint:*'","lint:es":"eslint src --cache -f friendly","lint:tsc":"tsc --noEmit","prepare":"simple-git-hooks","release":"changeset publish","test":"run-p 'test:*'","test:multipleEslintrcs":"eslint --ext ts,tsx tests/multipleEslintrcs","test:multipleTsconfigs":"eslint --ext ts,tsx tests/multipleTsconfigs","test:withJsExtension":"node tests/withJsExtension/test.js && eslint --ext ts,tsx tests/withJsExtension","test:withJsconfig":"eslint --ext js tests/withJsconfig","test:withPaths":"eslint --ext ts,tsx tests/withPaths","test:withPathsAndNestedBaseUrl":"eslint --ext ts,tsx tests/withPathsAndNestedBaseUrl","test:withQuerystring":"eslint --ext ts,tsx tests/withQuerystring","test:withoutPaths":"eslint --ext ts,tsx tests/withoutPaths","typecov":"type-coverage"},"peerDependencies":{"eslint":"*","eslint-plugin-import":"*"},"dependencies":{"debug":"^4.3.5","enhanced-resolve":"^5.15.0","eslint-module-utils":"^2.8.1","fast-glob":"^3.3.2","get-tsconfig":"^4.7.5","is-core-module":"^2.13.1","is-glob":"^4.0.3"},"devDependencies":{"@1stg/lib-config":"^12.0.1","@changesets/changelog-github":"^0.5.0","@changesets/cli":"^2.27.5","@commitlint/cli":"^17.8.1","@mozilla/glean":"^3.0.0","@pkgr/rollup":"^4.1.3","@types/debug":"^4.1.12","@types/is-core-module":"^2.2.2","@types/is-glob":"^4.0.4","@types/node":"^18.19.28","@types/unist":"^2.0.10","dummy.js":"link:dummy.js","eslint":"^8.57.0","eslint-import-resolver-typescript":"link:.","eslint-plugin-import":"npm:eslint-plugin-i@^2.29.1","lint-staged":"^13.3.0","npm-run-all2":"^5.0.2","prettier":"^2.8.8","react":"^18.2.0","simple-git-hooks":"^2.9.0","size-limit":"^11.0.0","size-limit-preset-node-lib":"^0.3.0","type-coverage":"^2.27.0","typescript":"^5.3.2"},"resolutions":{"eslint-import-resolver-typescript":"link:.","prettier":"^2.8.8"},"typeCoverage":{"atLeast":100,"cache":true,"detail":true,"ignoreAsAssertion":true,"ignoreNonNullAssertion":true,"ignoreCatch":true,"strict":true,"update":true},"_id":"@daveydave856/eslint-import-resolver-typescript@3.6.2","gitHead":"cf9660f799159f9caa69da211726e9ba4debde9d","bugs":{"url":"https://github.com/import-js/eslint-import-resolver-typescript/issues"},"homepage":"https://github.com/import-js/eslint-import-resolver-typescript#readme","_nodeVersion":"18.20.3","_npmVersion":"10.7.0","dist":{"integrity":"sha512-HAkx3mxqZzHjf4y9aughtPEX3Pl1OymAUtr1/Xz4zLTv/U0pKT0giHmZh42QzyPKLOI7jgDQ1p1OHngG3DN2Dg==","shasum":"3c00ce5e94721a149e2e8cc59cc9aa0c3301ea7a","tarball":"https://registry.npmjs.org/@daveydave856/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.2.tgz","fileCount":9,"unpackedSize":46539,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHFKoS4Gw4pvSpGENP5Lt2FCliMMo01hdFqWvnhL30PTAiA1SDDF+4xWf1+flLsA0kSvv2zugXekHMNIkreD1UB1Ng=="}]},"_npmUser":{"name":"daveydave856","email":"hello@davidensinger.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-import-resolver-typescript_3.6.2_1719507179622_0.9365753549129539"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-27T16:52:59.460Z","3.6.2":"2024-06-27T16:52:59.771Z","modified":"2024-06-27T16:53:00.107Z"},"maintainers":[{"name":"daveydave856","email":"hello@davidensinger.com"}],"description":"This plugin adds `TypeScript` support to `eslint-plugin-import`","homepage":"https://github.com/import-js/eslint-import-resolver-typescript#readme","keywords":["typescript","eslint","import","resolver","plugin"],"repository":{"type":"git","url":"git+https://github.com/import-js/eslint-import-resolver-typescript.git"},"contributors":[{"name":"JounQin","email":"admin@1stg.me","url":"https://www.1stG.me"}],"author":{"name":"Alex Gorbatchev","email":"alex.gorbatchev@gmail.com"},"bugs":{"url":"https://github.com/import-js/eslint-import-resolver-typescript/issues"},"license":"ISC","readme":"# eslint-import-resolver-typescript\n\n**This is a fork because I wanted this fix 9569460d0ac91353c3e3c92d3c30fff74a3cf690 sooner than later**\n\n[![GitHub Actions](https://github.com/import-js/eslint-import-resolver-typescript/workflows/CI/badge.svg)](https://github.com/import-js/eslint-import-resolver-typescript/actions/workflows/ci.yml)\n[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fimport-js%2Feslint-import-resolver-typescript%2Fmaster%2Fpackage.json)](https://github.com/plantain-00/type-coverage)\n[![npm](https://img.shields.io/npm/v/eslint-import-resolver-typescript.svg)](https://www.npmjs.com/package/eslint-import-resolver-typescript)\n[![GitHub Release](https://img.shields.io/github/release/import-js/eslint-import-resolver-typescript)](https://github.com/import-js/eslint-import-resolver-typescript/releases)\n\n[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)\n\nThis plugin adds [`TypeScript`][] support to [`eslint-plugin-import`][] (Or maybe you want to try [`eslint-plugin-i`][] for faster speed)\n\nThis means you can:\n\n- `import`/`require` files with extension `.cts`/`.mts`/`.ts`/`.tsx`/`.d.cts`/`.d.mts`/`.d.ts`\n- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`\n- Prefer resolving `@types/*` definitions over plain `.js`/`.jsx`\n- Multiple tsconfigs support just like normal\n- `imports/exports` fields support in `package.json`\n\n## TOC <!-- omit in toc -->\n\n- [Notice](#notice)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Options from `enhanced-resolve`](#options-from-enhanced-resolve)\n  - [`conditionNames`](#conditionnames)\n  - [`extensions`](#extensions)\n  - [`extensionAlias`](#extensionalias)\n  - [`mainFields`](#mainfields)\n  - [Other options](#other-options)\n  - [Default options](#default-options)\n- [Contributing](#contributing)\n- [Sponsors](#sponsors)\n- [Backers](#backers)\n- [Changelog](#changelog)\n- [License](#license)\n\n## Notice\n\nAfter version 2.0.0, `.d.ts` will take higher priority then normal `.js`/`.jsx` files on resolving `node_modules` packages in favor of `@types/*` definitions or its own definition.\n\nIf you're facing some problems on rules `import/default` or `import/named` from [`eslint-plugin-import`][], do not post any issue here, because they are just working exactly as [expected](https://github.com/import-js/eslint-import-resolver-typescript/issues/31#issuecomment-539751607) on our sides, take [import-js/eslint-plugin-import#1525](https://github.com/import-js/eslint-plugin-import/issues/1525) as reference or post a new issue to [`eslint-plugin-import`][] instead.\n\n## Installation\n\n```sh\n# npm\nnpm i -D eslint-plugin-import eslint-import-resolver-typescript\n\n# pnpm\npnpm i -D eslint-plugin-import eslint-import-resolver-typescript\n\n# yarn\nyarn add -D eslint-plugin-import eslint-import-resolver-typescript\n```\n\n**Important when using `eslint-plugin-i` and `npm`**: Use `npm i -D eslint-plugin-import@eslint-plugin-i@latest eslint-import-resolver-typescript`, or you will end up with both `eslint-plugin-import` and `eslint-plugin-i` in your node_modules.\n\n## Configuration\n\nAdd the following to your `.eslintrc` config:\n\n```jsonc\n{\n  \"plugins\": [\"import\"],\n  \"rules\": {\n    // turn on errors for missing imports\n    \"import/no-unresolved\": \"error\"\n  },\n  \"settings\": {\n    \"import/parsers\": {\n      \"@typescript-eslint/parser\": [\".ts\", \".tsx\"]\n    },\n    \"import/resolver\": {\n      \"typescript\": {\n        \"alwaysTryTypes\": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`\n\n        // Choose from one of the \"project\" configs below or omit to use <root>/tsconfig.json by default\n\n        // use <root>/path/to/folder/tsconfig.json\n        \"project\": \"path/to/folder\",\n\n        // Multiple tsconfigs (Useful for monorepos)\n\n        // use a glob pattern\n        \"project\": \"packages/*/tsconfig.json\",\n\n        // use an array\n        \"project\": [\n          \"packages/module-a/tsconfig.json\",\n          \"packages/module-b/tsconfig.json\"\n        ],\n\n        // use an array of glob patterns\n        \"project\": [\n          \"packages/*/tsconfig.json\",\n          \"other-packages/*/tsconfig.json\"\n        ]\n      }\n    }\n  }\n}\n```\n\n## Options from [`enhanced-resolve`][]\n\n### `conditionNames`\n\nDefault:\n\n```jsonc\n[\n  \"types\",\n  \"import\",\n\n  // APF: https://angular.io/guide/angular-package-format\n  \"esm2020\",\n  \"es2020\",\n  \"es2015\",\n\n  \"require\",\n  \"node\",\n  \"node-addons\",\n  \"browser\",\n  \"default\"\n]\n```\n\n### `extensions`\n\nDefault:\n\n```jsonc\n[\n  // `.mts`, `.cts`, `.d.mts`, `.d.cts`, `.mjs`, `.cjs` are not included because `.cjs` and `.mjs` must be used explicitly\n  \".ts\",\n  \".tsx\",\n  \".d.ts\",\n  \".js\",\n  \".jsx\",\n  \".json\",\n  \".node\"\n]\n```\n\n### `extensionAlias`\n\nDefault:\n\n```jsonc\n{\n  \".js\": [\n    \".ts\",\n    // `.tsx` can also be compiled as `.js`\n    \".tsx\",\n    \".d.ts\",\n    \".js\"\n  ],\n  \".jsx\": [\".tsx\", \".d.ts\", \".jsx\"],\n  \".cjs\": [\".cts\", \".d.cts\", \".cjs\"],\n  \".mjs\": [\".mts\", \".d.mts\", \".mjs\"]\n}\n```\n\n### `mainFields`\n\nDefault:\n\n```jsonc\n[\n  \"types\",\n  \"typings\",\n\n  // APF: https://angular.io/guide/angular-package-format\n  \"fesm2020\",\n  \"fesm2015\",\n  \"esm2020\",\n  \"es2020\",\n\n  \"module\",\n  \"jsnext:main\",\n\n  \"main\"\n]\n```\n\n### Other options\n\nYou can pass through other options of [`enhanced-resolve`][] directly\n\n### Default options\n\nYou can reuse `defaultConditionNames`, `defaultExtensions`, `defaultExtensionAlias` and `defaultMainFields` by `require/import` them directly\n\n## Contributing\n\n- Make sure your change is covered by a test import.\n- Make sure that `yarn test` passes without a failure.\n- Make sure that `yarn lint` passes without conflicts.\n- Make sure your code changes match our [type-coverage](https://github.com/plantain-00/type-coverage) settings: `yarn type-coverage`.\n\nWe have [GitHub Actions](https://github.com/import-js/eslint-import-resolver-typescript/actions) which will run the above commands on your PRs.\n\nIf either fails, we won't be able to merge your PR until it's fixed.\n\n## Sponsors\n\n| 1stG                                                                                                                               | RxTS                                                                                                                               | UnTS                                                                                                                               |\n| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |\n\n## Backers\n\n| 1stG                                                                                                                             | RxTS                                                                                                                             | UnTS                                                                                                                             |\n| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |\n| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |\n\n## Changelog\n\nDetailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).\n\n## License\n\n[ISC][]\n\n[`eslint-plugin-i`]: https://github.com/un-es/eslint-plugin-i\n[`eslint-plugin-import`]: https://github.com/import-js/eslint-plugin-import\n[`enhanced-resolve`]: https://github.com/webpack/enhanced-resolve\n[`typescript`]: https://www.typescriptlang.org\n[isc]: https://opensource.org/licenses/ISC\n","readmeFilename":"README.md"}