-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[import-order] order within import type
#2172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seems like to do what you want, the schema would need some way of providing alternative config options for a specific group. I suppose we could add |
or can we take the order from |
I'm not sure what you mean. Can you elaborate? |
This answer helped me to solve similar problem |
I have the same issue. @ljharb the |
I have the same problem. import type { TablePagination, TableProps } from '../types'
import type { TableConfig } from '@idux/components/config'
import type { ComputedRef } from 'vue'
import { computed, ref, watchEffect } from 'vue'
import { callEmit } from '@idux/cdk/utils'
import { useGlobalConfig } from '@idux/components/config'
import { tablePagination, tableProps } from '../types' my config : {
alphabetize: { order: 'asc', caseInsensitive: false },
'newlines-between': 'always',
groups: ['type', 'builtin', 'external', 'internal', ['parent', 'sibling', 'index']],
pathGroups: [
{
pattern: '{vue,@vue/**}',
group: 'external',
position: 'before',
},
{
pattern: '@idux/**',
group: 'internal',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['type'],
}, |
Hope to support this configuration, thank you. @ljharb In addition, I have another idea, for 'type' grouping, according to groups' exclude 'type', do a sort again. |
Now,
import type
can be a separate group.I also find the ability to alphabetize very useful.
However, I find it very annoying that they don't work well together.
The problem is that the order of
import type
statement doesn't follow the order we define for other module types.Let's say we have the following options
e.g. I'd like to have the following order
The text was updated successfully, but these errors were encountered: