Separate import and import type
See original GitHub issueWith the new import type
syntax in Typescript, I feel it would be better for that to be separated than treated the same as any other import currently.
For example, there should be a separation between the two with an empty line, whilst the current setup autofixes both of them together.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Should I explicitly separate "import" and "import type ... - GitHub
Worst style: use import type as much as possible, separating values and types from the same module into separate import statements.
Read more >Documentation - TypeScript 3.8
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there's no remnant of...
Read more >Do I need to use the "import type" feature of TypeScript 3.8 if ...
import type only imports declarations to be used for type annotations and declarations. It always gets fully erased, so there's no remnant of...
Read more >type-only imports — A new TypeScript feature that benefits ...
import type ... from — Lets the compiler know that what you're importing is definitely a type and is not needed (or wanted)...
Read more >Import a Type from Another file using TypeScript | bobbyhadz
To import a type from another file in TypeScript: Export the type from file A , e.g. export type Employee = {} ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi! You can do this with Custom grouping:
Here are some examples:
https://github.com/lydell/eslint-plugin-simple-import-sort/blob/1f753fb3e5b8eadf6cf9fdda8790d01dd9eade26/examples/.eslintrc.js#L121-L222
My conclusion here is: