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] Unify directory naming #2000

Open
haworku opened this issue Apr 19, 2022 · 1 comment
Open

[chore] Unify directory naming #2000

haworku opened this issue Apr 19, 2022 · 1 comment
Labels
good first issue Good for newcomers type: documentation Improvements or additions to documentation

Comments

@haworku
Copy link
Contributor

haworku commented Apr 19, 2022

Does your feature request relate to a specific USWDS component or github issue?
#1929

Is your feature request related to a problem? Please describe.

As @brandonlenz points out - We don't seem to have a unified pattern for how we name folders when double nesting things, (e.g. in this case SummaryBox/SummaryBox, or Footer/Footer or card/Card). JS, React, and TS are pretty un-opinionated about this, so none are wrong. Let's converge on a naming convention.

Describe the solution you'd like

If a folder does not directly contain a component file, it should be lowercased. If a folder contains a matching component file it should be CapitalCased.

Examples:summarybox/SummaryBox/SummaryBox.tsx versus Address/Address.tsx)

Describe alternatives you've considered

  • kebab-case, but that's pretty uncommon React folder structures.
  • camelCase is a common JS convention to consider. However, chose lowercased bc it was already suggested and it helps de-emphasize the organizational folders even further.
@haworku haworku added type: documentation Improvements or additions to documentation good first issue Good for newcomers labels Apr 19, 2022
@werdnanoslen
Copy link
Contributor

@haworku would #2728 resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants