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
Copy file name to clipboardExpand all lines: docs/rules/no-duplicates.md
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,33 @@ import SomeDefaultClass from './mod?minify'
67
67
import*from'./mod.js?minify'
68
68
```
69
69
70
+
### Inline Type imports
71
+
72
+
TypeScript 4.5 introduced a new [feature](https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names) that allows mixing of named value and type imports. In order to support fixing to an inline type import when duplicate imports are detected, `prefer-inline` can be set to true.
If the core ESLint version is good enough (i.e. you're _not_ using Flow and you _are_ using [`import/extensions`](./extensions.md)), keep it and don't use this.
// a user might set prefer-inline but not have a supporting TypeScript version. Flow does not support inline types so this should fail in that case as well.
0 commit comments