Skip to content
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

fix(no-wildcard-imports): remove migration for TokenSizeKeys #255

Merged
merged 2 commits into from
Oct 10, 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/short-garlics-kiss.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 no longer migrate the TokenSizeKeys import
12 changes: 0 additions & 12 deletions src/rules/__tests__/no-wildcard-imports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,6 @@ import {type ButtonBaseProps} from '@primer/react/experimental'`,
},
],
},
{
code: `import type {TokenSizeKeys} from '@primer/react/lib-esm/Token/TokenBase'`,
output: `import {type TokenSizeKeys} from '@primer/react'`,
errors: [
{
messageId: 'wildcardMigration',
data: {
wildcardEntrypoint: '@primer/react/lib-esm/Token/TokenBase',
},
},
],
},
{
code: `import type {ItemProps} from '@primer/react/lib-esm/deprecated/ActionList'`,
output: `import {type ActionListItemProps as ItemProps} from '@primer/react/deprecated'`,
Expand Down
10 changes: 0 additions & 10 deletions src/rules/no-wildcard-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,6 @@ const wildcardImports = new Map([
},
],
],
[
'@primer/react/lib-esm/Token/TokenBase',
[
{
type: 'type',
name: 'TokenSizeKeys',
from: '@primer/react',
},
],
],
[
'@primer/react/lib-esm/deprecated/ActionList',
[
Expand Down