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 is a resolver for `eslint-plugin-import(-x)` plugin, not an ESLint plugin itself, it adds [`TypeScript`][] support to [`eslint-plugin-import`][] (Or maybe you want to try [`eslint-plugin-import-x`][] for faster speed)
15
+
This is a resolver for `eslint-plugin-import(-x)` plugin, not an ESLint plugin itself, it adds [`TypeScript`][] support to [`eslint-plugin-import`][]. (Or maybe you want to try [`eslint-plugin-import-x`][] for faster speed.)
16
16
17
17
This means you can:
18
18
19
19
-`import`/`require` files with extension `.cts`/`.mts`/`.ts`/`.tsx`/`.d.cts`/`.d.mts`/`.d.ts`
20
20
- Use [`paths`](https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping) defined in `tsconfig.json`
21
21
- Prefer resolving `@types/*` definitions over plain `.js`/`.jsx`
22
-
- Multiple tsconfigs support just like normal
22
+
- Multiple tsconfigs support, just like normal
23
23
-`imports/exports` fields support in `package.json`
24
24
25
25
## TOC <!-- omit in toc -->
@@ -50,74 +50,80 @@ This means you can:
50
50
51
51
## Notice
52
52
53
-
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.
53
+
After version 2.0.0, `.d.ts` will take higher priority than normal `.js`/`.jsx` files on resolving `node_modules` packages in favor of `@types/*` definitions or its own definition.
54
54
55
-
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.
55
+
If you're facing some problems with rules `import/default` or `import/named` from [`eslint-plugin-import`][], do not post any issue here, because they are working exactly as [expected](https://github.com/import-js/eslint-import-resolver-typescript/issues/31#issuecomment-539751607) on our side. Take[import-js/eslint-plugin-import#1525](https://github.com/import-js/eslint-plugin-import/issues/1525) as reference or post a new issue on[`eslint-plugin-import`][] instead.
56
56
57
57
## Installation
58
58
59
59
### `eslint-plugin-import-x`
60
60
61
61
```sh
62
-
#npm
62
+
#NPM
63
63
npm i -D eslint-plugin-import-x eslint-import-resolver-typescript
64
64
65
-
#pnpm
65
+
#PNPM
66
66
pnpm i -D eslint-plugin-import-x eslint-import-resolver-typescript
bun add -d eslint-plugin-import eslint-import-resolver-typescript
83
89
```
84
90
85
91
## Configuration
86
92
87
93
### `eslint.config.js`
88
94
89
-
If you are using `eslint-plugin-import-x@>=4.5.0`, you can use import/require to reference `eslint-import-resolver-typescript` directly in your ESLint flat config:
95
+
If you are using `eslint-plugin-import-x@>=4.5.0`, you can use `import`/`require` to reference `eslint-import-resolver-typescript` directly in your ESLint flat config:
0 commit comments