Skip to content

Commit

Permalink
fix(no-wildcard-imports): move ButtonBase to experimental (#253)
Browse files Browse the repository at this point in the history
* feat: move ButtonBase to experimental

* chore: add changeset
  • Loading branch information
joshblack authored Oct 9, 2024
1 parent 60d8088 commit 456bf4d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-rings-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'eslint-plugin-primer-react': patch
---

Update no-wildcard-imports rule to move ButtonBase to `@primer/react/experimental`
6 changes: 3 additions & 3 deletions src/rules/__tests__/no-wildcard-imports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ import type {BetterSystemStyleObject} from '@primer/react/lib-esm/sx'`,
{
code: `import {ButtonBase} from '@primer/react/lib-esm/Button/ButtonBase';
import type {ButtonBaseProps} from '@primer/react/lib-esm/Button/ButtonBase'`,
output: `import {ButtonBase} from '@primer/react'
import {type ButtonBaseProps} from '@primer/react'`,
output: `import {ButtonBase} from '@primer/react/experimental'
import {type ButtonBaseProps} from '@primer/react/experimental'`,
errors: [
{
messageId: 'wildcardMigration',
Expand All @@ -188,7 +188,7 @@ import {type ButtonBaseProps} from '@primer/react'`,
},
{
code: `import type {ButtonBaseProps} from '@primer/react/lib-esm/Button/types'`,
output: `import {type ButtonBaseProps} from '@primer/react'`,
output: `import {type ButtonBaseProps} from '@primer/react/experimental'`,
errors: [
{
messageId: 'wildcardMigration',
Expand Down
6 changes: 3 additions & 3 deletions src/rules/no-wildcard-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ const wildcardImports = new Map([
{
type: 'type',
name: 'ButtonBaseProps',
from: '@primer/react',
from: '@primer/react/experimental',
},
{
name: 'ButtonBase',
from: '@primer/react',
from: '@primer/react/experimental',
},
],
],
Expand All @@ -24,7 +24,7 @@ const wildcardImports = new Map([
{
type: 'type',
name: 'ButtonBaseProps',
from: '@primer/react',
from: '@primer/react/experimental',
},
],
],
Expand Down

0 comments on commit 456bf4d

Please sign in to comment.