@@ -105,6 +105,20 @@ ruleTester.run('no-wildcard-imports', rule, {
105
105
] ,
106
106
} ,
107
107
108
+ // Test renamed wildcard imports
109
+ {
110
+ code : `import type {ItemProps} from '@primer/react/lib-esm/deprecated/ActionList/Item'` ,
111
+ output : `import type {ActionListItemProps as ItemProps} from '@primer/react/deprecated'` ,
112
+ errors : [
113
+ {
114
+ messageId : 'wildcardMigration' ,
115
+ data : {
116
+ wildcardEntrypoint : '@primer/react/lib-esm/deprecated/ActionList/Item' ,
117
+ } ,
118
+ } ,
119
+ ] ,
120
+ } ,
121
+
108
122
// Test migrations
109
123
110
124
// Components --------------------------------------------------------------
@@ -226,7 +240,7 @@ import type {ButtonBaseProps} from '@primer/react'`,
226
240
} ,
227
241
{
228
242
code : `import type {ItemProps} from '@primer/react/lib-esm/deprecated/ActionList'` ,
229
- output : `import type {ActionListItemProps} from '@primer/react/deprecated'` ,
243
+ output : `import type {ActionListItemProps as ItemProps } from '@primer/react/deprecated'` ,
230
244
errors : [
231
245
{
232
246
messageId : 'wildcardMigration' ,
@@ -238,7 +252,7 @@ import type {ButtonBaseProps} from '@primer/react'`,
238
252
} ,
239
253
{
240
254
code : `import type {GroupedListProps} from '@primer/react/lib-esm/deprecated/ActionList/List'` ,
241
- output : `import type {ActionListGroupedListProps} from '@primer/react/deprecated'` ,
255
+ output : `import type {ActionListGroupedListProps as GroupedListProps } from '@primer/react/deprecated'` ,
242
256
errors : [
243
257
{
244
258
messageId : 'wildcardMigration' ,
@@ -250,7 +264,7 @@ import type {ButtonBaseProps} from '@primer/react'`,
250
264
} ,
251
265
{
252
266
code : `import {ItemInput} from '@primer/react/lib-esm/deprecated/ActionList/List'` ,
253
- output : `import {ActionListItemInput} from '@primer/react/deprecated'` ,
267
+ output : `import {ActionListItemInput as ItemInput } from '@primer/react/deprecated'` ,
254
268
errors : [
255
269
{
256
270
messageId : 'wildcardMigration' ,
@@ -262,7 +276,7 @@ import type {ButtonBaseProps} from '@primer/react'`,
262
276
} ,
263
277
{
264
278
code : `import type {ItemProps} from '@primer/react/lib-esm/deprecated/ActionList/Item'` ,
265
- output : `import type {ActionListItemProps} from '@primer/react/deprecated'` ,
279
+ output : `import type {ActionListItemProps as ItemProps } from '@primer/react/deprecated'` ,
266
280
errors : [
267
281
{
268
282
messageId : 'wildcardMigration' ,
0 commit comments