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

chore(eslint-config-pie): DSW-000 add rule for consistent type imports #1622

Merged
merged 36 commits into from
Oct 2, 2024

Conversation

xander-marjoram
Copy link
Contributor

@xander-marjoram xander-marjoram commented Jul 23, 2024

Describe your changes (can list changeset entries if preferable)

I discovered the eslint rule @typescript-eslint/consistent-type-imports and I thought it would be good to add it to our PIE config package.

Adding type wherever possible is beneficial because it reduces the amount of code that TypeScript needs to include in the output JS; i.e., if an import is only needed to provide TS typing then JavaScript doesn't need it at all.

This is the main change, everything else is just updating to adhere to the new rule.

Author Checklist (complete before requesting a review)

  • I have performed a self-review of my code
  • I have reviewed the PIE Storybook PR preview
  • If changes will affect consumers of the package, I have created a changeset entry.

Copy link

changeset-bot bot commented Jul 23, 2024

🦋 Changeset detected

Latest commit: 9eaffb8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 42 packages
Name Type
@justeattakeaway/eslint-config-pie Minor
@justeattakeaway/generator-pie-component Patch
@justeattakeaway/pie-assistive-text Patch
@justeattakeaway/pie-button Patch
@justeattakeaway/pie-card Patch
@justeattakeaway/pie-checkbox Patch
@justeattakeaway/pie-checkbox-group Patch
@justeattakeaway/pie-chip Patch
@justeattakeaway/pie-css Patch
@justeattakeaway/pie-form-label Patch
@justeattakeaway/pie-icon-button Patch
@justeattakeaway/pie-icons-react Patch
@justeattakeaway/pie-lottie-player Patch
@justeattakeaway/pie-modal Patch
@justeattakeaway/pie-notification Patch
@justeattakeaway/pie-switch Patch
@justeattakeaway/pie-textarea Patch
@justeattakeaway/pie-toast Patch
@justeattakeaway/pie-webc-core Patch
@justeattakeaway/pie-webc-testing Patch
@justeattakeaway/pie-wrapper-react Patch
pie-docs Patch
pie-storybook Patch
@justeattakeaway/pie-text-input Patch
@justeattakeaway/pie-webc Patch
@justeattakeaway/pie-cookie-banner Patch
wc-angular12 Patch
wc-next10 Patch
wc-next13 Patch
wc-nuxt2 Patch
wc-nuxt3 Patch
wc-react17 Patch
wc-react18 Patch
wc-vanilla Patch
wc-vue3 Patch
@justeattakeaway/pie-divider Patch
@justeattakeaway/pie-link Patch
@justeattakeaway/pie-radio-group Patch
@justeattakeaway/pie-radio Patch
@justeattakeaway/pie-spinner Patch
@justeattakeaway/pie-tag Patch
@justeattakeaway/pie-icons-webc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@xander-marjoram xander-marjoram self-assigned this Jul 23, 2024
@xander-marjoram xander-marjoram marked this pull request as ready for review July 23, 2024 14:41
@xander-marjoram xander-marjoram requested review from a team as code owners July 23, 2024 14:41
# Conflicts:
#	apps/pie-storybook/stories/pie-assistive-text.stories.ts
#	apps/pie-storybook/stories/pie-checkbox-group.stories.ts
#	apps/pie-storybook/stories/pie-checkbox.stories.ts
#	apps/pie-storybook/stories/pie-form-label.stories.ts
#	apps/pie-storybook/stories/pie-icon-button.stories.ts
#	apps/pie-storybook/stories/pie-lottie-player.stories.ts
#	apps/pie-storybook/stories/pie-modal.stories.ts
#	apps/pie-storybook/stories/pie-notification.stories.ts
#	apps/pie-storybook/stories/pie-spinner.stories.ts
#	apps/pie-storybook/stories/pie-switch.stories.ts
#	apps/pie-storybook/stories/pie-textarea.stories.ts
#	apps/pie-storybook/stories/pie-toast.stories.ts
#	yarn.lock
# Conflicts:
#	packages/components/pie-checkbox/test/component/pie-checkbox.spec.ts
@xander-marjoram xander-marjoram force-pushed the dsw-000-consistent-type-imports branch from aad3e74 to cc405ce Compare September 18, 2024 14:39
# Conflicts:
#	packages/components/pie-radio/src/defs-react.ts
#	packages/components/pie-radio/src/index.ts
#	packages/components/pie-radio/test/component/pie-radio.spec.ts
#	yarn.lock
# Conflicts:
#	packages/components/pie-card/src/index.ts
#	packages/components/pie-cookie-banner/src/index.ts
#	packages/components/pie-cookie-banner/test/helpers/page-object/pie-cookie-banner.page.ts
@xander-marjoram xander-marjoram marked this pull request as ready for review October 1, 2024 13:12
@xander-marjoram xander-marjoram removed work-in-progress This pull request is still a work in progress and may not be ready for review DO NOT MERGE labels Oct 1, 2024
raoufswe
raoufswe previously approved these changes Oct 1, 2024
Copy link
Member

@raoufswe raoufswe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

kevinrodrigues
kevinrodrigues previously approved these changes Oct 1, 2024
@xander-marjoram xander-marjoram merged commit efb35af into main Oct 2, 2024
54 checks passed
@xander-marjoram xander-marjoram deleted the dsw-000-consistent-type-imports branch October 2, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment