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

ER: Codebase Formatting Standards #1872

Open
6 tasks
Tracked by #1877
efrenmarin45 opened this issue Dec 2, 2024 · 3 comments
Open
6 tasks
Tracked by #1877

ER: Codebase Formatting Standards #1872

efrenmarin45 opened this issue Dec 2, 2024 · 3 comments
Assignees
Labels
Complexity: Small Emergent Request Something discovered while working on an issue that is possibly out of scope, may require discussion Feature: Code Health Make our code more readable, testable, and modular Role: Frontend React front end work size: 0.25pt Can be done in 1.5 hours

Comments

@efrenmarin45
Copy link
Member

efrenmarin45 commented Dec 2, 2024

Emergent Requirement - Problem Description

  • Not having a uniformed formatting template is detrimental to the health of the codebase. Currently, white spaces, indentation widths, trailing commas and more are all dependent on the developers personal preference. This hurts the codebase by having multiple formatting styles arise when merging code in making it more cumbersome to read and maintain.

Relevant Issue(s)

(Updated by PMs)

Date discovered

  • November 20th, 2024

Did this require a temporary workaround? If yes, what was it?

  • No

Who was involved

What happens if this is not addressed

  • Delays in merging PR's due to miscellaneous formatting differences.
  • Codebase health continues to suffer from unorganized formats.

Resources

Recommended Action Items

  • Propose a standard format
  • Host a meeting to go over proposed format
  • Discuss personal preferences and allow for each developer to make a case for each formatting option possible
  • Once formatting options are solidified, assign ticket to a developer to create the necessary files and steps needed for everyone to adopt the changes.
  • One master change made to the main branch knowing it might be a massive code diff
  • After the main branch is updated with the new formatting, developers can pull and resolve locally.

Potential Solutions

  • First thing would be to have the development team agree on a set standard for formatting.
  • Once a decision is made, both a .prettierrc file with JSON would need to be created as well as an .editorconfig file using JSON.
  • To help ease the transition for both current and future developers, an in-depth workflow and set-up guide should be created.
@efrenmarin45 efrenmarin45 added Question Further information is requested Discussion Needs to be discussed as a team Role: Missing Feature: Missing size: 0.25pt Can be done in 1.5 hours Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Emergent Request Something discovered while working on an issue that is possibly out of scope, may require discussion labels Dec 2, 2024
@efrenmarin45 efrenmarin45 self-assigned this Dec 2, 2024
@aqandrew
Copy link
Member

aqandrew commented Dec 6, 2024

+1 for Prettier!

I would recommend also installing a pre-commit hook like lint-staged to run Prettier on staged files, as recommended in Prettier's docs. IMO the most convenient way to run Prettier is using VS Code's Prettier plugin + format-on-save--but it's difficult to enforce that everyone use the same editor/plugin.

Running a pre-commit hook will ensure that the agreed-upon code styles are followed after this issue is closed.

@ryanfchase ryanfchase added Complexity: Small Role: Frontend React front end work Feature: Code Health Make our code more readable, testable, and modular and removed Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Role: Missing Feature: Missing labels Dec 10, 2024
@github-project-automation github-project-automation bot moved this to New Issue Approval in P: 311: Project Board Dec 10, 2024
@ryanfchase ryanfchase moved this from New Issue Approval to In progress in P: 311: Project Board Jan 1, 2025
@ryanfchase ryanfchase self-assigned this Jan 1, 2025
@ryanfchase
Copy link
Member

Assigned myself to review the ER and kick off follow up tickets. ETA today/tmo.

@ryanfchase
Copy link
Member

I have created an epic that outlines the steps needed to integrate Prettier into our repo. I will consider this ticket "In Review" while product and dev lead reviews the epic.

@ryanfchase ryanfchase moved this from In progress to In Review in P: 311: Project Board Jan 2, 2025
@ryanfchase ryanfchase removed Question Further information is requested Discussion Needs to be discussed as a team labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Small Emergent Request Something discovered while working on an issue that is possibly out of scope, may require discussion Feature: Code Health Make our code more readable, testable, and modular Role: Frontend React front end work size: 0.25pt Can be done in 1.5 hours
Projects
Status: In Review
Development

No branches or pull requests

3 participants