Skip to content

fix(no-wildcard-imports): move ButtonBase to experimental #253

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

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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