Skip to content

Commit 62e1ae8

Browse files
committed
feat: add support for ResponsiveValue
1 parent 2f8281c commit 62e1ae8

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/rules/__tests__/no-wildcard-imports.test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,18 @@ import type {ButtonBaseProps} from '@primer/react'`,
373373
},
374374
],
375375
},
376+
{
377+
code: `import type {ResponsiveValue} from '@primer/react/lib-esm/hooks/useResponsiveValue'`,
378+
output: `import type {ResponsiveValue} from '@primer/react'`,
379+
errors: [
380+
{
381+
messageId: 'wildcardMigration',
382+
data: {
383+
wildcardEntrypoint: '@primer/react/lib-esm/hooks/useResponsiveValue',
384+
},
385+
},
386+
],
387+
},
376388

377389
// Utilities ---------------------------------------------------------------
378390

src/rules/no-wildcard-imports.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@ const wildcardImports = new Map([
2828
},
2929
],
3030
],
31-
[
32-
'@primer/react/lib-esm/Dialog',
33-
[
34-
{
35-
name: 'Dialog',
36-
from: '@primer/react/experimental',
37-
},
38-
{
39-
name: 'DialogHeaderProps',
40-
from: '@primer/react/experimental',
41-
type: 'type',
42-
},
43-
],
44-
],
4531
[
4632
'@primer/react/lib-esm/Dialog/Dialog',
4733
[
@@ -195,6 +181,11 @@ const wildcardImports = new Map([
195181
name: 'useResponsiveValue',
196182
from: '@primer/react',
197183
},
184+
{
185+
type: 'type',
186+
name: 'ResponsiveValue',
187+
from: '@primer/react',
188+
},
198189
],
199190
],
200191

0 commit comments

Comments
 (0)