This adds a new special string, <TYPES> that can be added to the importOrder array. When used, it will cause type imports to be sorted as specified by its location in the array.
Notes:
If it is used, it will disable importOrderCombineTypeAndValueImports, throwing a warning if both are used. This is because:
We will split apart type and value import declarations if <TYPES> is used, so that types can be sorted appropriately.
Thinking towards the next breaking change when we remove options, I think the default will be to enable importOrderCombineTypeAndValueImports, and this change will give users a good way to opt-out of that behavior if they want, by specifying the location for <TYPES>.
Closes https://github.com/IanVS/prettier-plugin-sort-imports/issues/35
Adapted from https://github.com/trivago/prettier-plugin-sort-imports/pull/153, by @Xenfo.
This adds a new special string,
<TYPES>
that can be added to theimportOrder
array. When used, it will cause type imports to be sorted as specified by its location in the array.Notes:
importOrderCombineTypeAndValueImports
, throwing a warning if both are used. This is because:<TYPES>
is used, so that types can be sorted appropriately.importOrderCombineTypeAndValueImports
, and this change will give users a good way to opt-out of that behavior if they want, by specifying the location for<TYPES>
.