Skip to content

pr05 Typescript Migration: Update client/common folder to use the barrel folder structure #7

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

Open
wants to merge 4 commits into
base: pr05/migrate_client_common_rebuild
Choose a base branch
from

Conversation

clairep94
Copy link
Owner

Proposing to update the common folder (and future folders with react components) to use the barrel folder structure:

/client
  /common
    /Button
      Button.tsx
      Button.test.tsx
      Button.storybook.ts
      Button.styles.ts
      Button.types.ts
      index.ts <---- Exports the non-test files above

Benefits:

  • Improves Maintainability: When internal file structure changes, only the barrel files need to be updated, keeping import paths stable across the codebase.
  • Enhances Discoverability: Barrels act as a directory index, making it easy to see and understand what modules a folder exposes.
  • Encourages Consistency: Enforces a consistent module organization and import pattern across teams and contributors.
  • Facilitates Tree Shaking: When set up properly with ES modules, unused exports can be eliminated during bundling, improving app size.

Changes:
Move the following to barrel structure after PR processing#3565

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant