You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin adds TypeScript support to [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import).
15
+
This plugin adds [`TypeScript`][] support to [`eslint-plugin-import`][]
16
16
17
17
This means you can:
18
18
19
-
-`import`/`require` files with extension `.cts`/`.mts`/`.ts`/`.tsx`!
20
-
- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`.
21
-
- Prefer resolve`@types/*` definitions over plain `.js`.
22
-
- Multiple tsconfigs support just like normal.
23
-
-`exports` fields support in `package.json`
19
+
-`import`/`require` files with extension `.cts`/`.mts`/`.ts`/`.tsx`/`.d.cts`/`.d.mts`/`.d.ts`
20
+
- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`
21
+
- Prefer resolving`@types/*` definitions over plain `.js`/`.jsx`
22
+
- Multiple tsconfigs support just like normal
23
+
-`imports/exports` fields support in `package.json`
24
24
25
25
## TOC <!-- omit in toc -->
26
26
27
27
-[Notice](#notice)
28
28
-[Installation](#installation)
29
29
-[Configuration](#configuration)
30
+
-[Options from `enhanced-resolve`](#options-from-enhanced-resolve)
31
+
-[`conditionNames`](#conditionnames)
32
+
-[`extensions`](#extensions)
33
+
-[`extensionAlias`](#extensionalias)
34
+
-[`mainFields`](#mainfields)
35
+
-[Other options](#other-options)
36
+
-[Default options](#default-options)
30
37
-[Contributing](#contributing)
31
38
-[Sponsors](#sponsors)
32
39
-[Backers](#backers)
@@ -35,9 +42,9 @@ This means you can:
35
42
36
43
## Notice
37
44
38
-
After version 2.0.0, `.d.ts` will take higher priority then normal `.js` files on resolving `node_modules` packages in favor of `@types/*` definitions.
45
+
After 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.
39
46
40
-
If you're facing some problems on rules `import/default` or `import/named` from [eslint-plugin-import](https://github.com/benmosher/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 <https://github.com/benmosher/eslint-plugin-import/issues/1525> as reference or post a new issue to [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) instead.
47
+
If 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.
41
48
42
49
## Installation
43
50
@@ -98,6 +105,96 @@ Add the following to your `.eslintrc` config:
0 commit comments