hackforla / hackforla/website

ER: Adopting a coding style standard/guideline

Open
#6,807 4 comments 0 reactions 0 assignees View on GitHub
Complexity: Extra Large Dependency ER Feature: Refactor CSS Feature: Refactor HTML Feature: Refactor JS / Liquid Lang: GHA role: back end/devOps role: front end size: 1pt Skill: feasibility
Dominant language
JavaScript
Stars
363
Forks
872
Avg merge
2d 21h
Merged PRs (30d)
18

Description

### Dependency
- #4349

### Emergent Requirement - Problem

As our project grow and attract contributions from a diverse group of developers, we have different styles of coding styles across our codebase (trailing spaces, spaces between operators, braces style, etc.). This poses a challenge for readability, maintainability and collaboration.

Proposing we explore the feasibility of adopting a unified coding format standard.

### Issue you discovered this emergent requirement in
- #6777

### Date discovered
05/01/2024

### Did you have to do something temporarily
- [ ] YES
- [x] NO

### Who was involved
@tony1ee
@gaylem

### What happens if this is not addressed
- Different styles of code pose a challenge for readability, maintainability and collaboration.
- The absence of guidelines for naming, formatting, and commenting practices could adversely affect our professionalism and compromise the quality of our work.

### Resources
[Why Prettier](https://prettier.io/docs/en/why-prettier)
[Firefox CSS Guidelines](https://firefox-source-docs.mozilla.org/code-quality/coding-style/css_guidelines.html)
[VS Code Formatter: TypeScript](https://code.visualstudio.com/docs/languages/typescript#_formatting)
[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript?tab=readme-ov-file)
[Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html)

### Recommended Action Items
- [ ] Make a new issue
- [ ] Discuss with team
- [ ] Let a Team Lead know

### Potential solutions [draft]
We can solve this in several steps:
- [ ] Perform an analysis of existing codebase, including the language and file type.
- [ ] Research existing standardized guidelines and practices (potentially for each file type), then choose/define our standard
- [ ] Creating documents for reference and training
- [ ] Explore tooling and automation solutions: linters and formatters configurations in code editors, GHA checkers, etc.
- [ ] Consider either incremental refactoring or major refactoring for existing non-conforming code, depending on priority.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.