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

Clean up component exports #134

Open
ejmg opened this issue Jul 15, 2024 · 0 comments
Open

Clean up component exports #134

ejmg opened this issue Jul 15, 2024 · 0 comments
Labels
client P-Low Low priority relative to all other tasks.

Comments

@ejmg
Copy link
Collaborator

ejmg commented Jul 15, 2024

Summary

Title says it all. With the notable exception of the ui/ directory (used by shadcn-ui), the overall structure has always been to define a non-default exported "public" component from an index.tsx that is located in a directory with camel casing. Ex: TransactionsTable is exported from components/TransactionsTable/index.tsx. This was simply the pattern chosen at the time and, overall, has worked just fine. It gives a top level directory that is easy to ID quickly for imports, prevents confusing/accidental default export aliasing, and gives the illusion of "private" component modules (anything not in index.tsx is not supposed to be used directly).

Update everything to fit this pattern again. Adding an eslint rule to enforce the model would be ideal, too.

@ejmg ejmg added client P-Low Low priority relative to all other tasks. labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client P-Low Low priority relative to all other tasks.
Projects
None yet
Development

No branches or pull requests

1 participant