-
Notifications
You must be signed in to change notification settings - Fork 157
Establish project coding standards & guidelines #581
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
base: main
Are you sure you want to change the base?
Establish project coding standards & guidelines #581
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Hunter275 I'd love to get your thoughts on this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work Dan!
- **Readability:** Write code that is easy for others (and your future self) to | ||
understand. | ||
- **Consistency:** Adhere to these guidelines to maintain a consistent codebase. | ||
- **Simplicity (KISS):** Keep components and functions focused and avoid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what KISS means but maybe others don't
- **Reducer (`useReducer`):** Use for complex state logic involving multiple | ||
sub-values or when the next state depends on the previous one, especially | ||
within a single component or closely related components (can be co-located). | ||
- **Global State (Zustand):** Use Zustand for managing application-wide state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a link to Zustand
|
||
## Testing | ||
|
||
- **Test Framework (Vitest):** Use Vitest for all levels of automated testing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to vitest documentation
- **Test Framework (Vitest):** Use Vitest for all levels of automated testing, | ||
including unit, integration, and component tests. Global test | ||
configuration/setup files reside in `/src/tests`. | ||
- **Component Testing (React Testing Library):** Utilize React Testing Library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add link to documentation
|
||
**Core Principle: Minimize Bundle Size** | ||
|
||
A primary goal of this project is to maintain a small and performant application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add something about this being bundled onto SBCs or devices with very little memory
complexity. Therefore, we prioritize minimizing the number of third-party | ||
libraries. | ||
|
||
**Guidelines:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename "Dependency & Library Guidelines"
How do you plan to enforce these requirements? |
Description
This PR introduces
CODING_GUIDELINES.md
which is expected to provide guidelines for developers contributing to the project.This includes coding standards, preferred tools (Deno, Vitest, Zustand, Tailwind), file organization, testing requirements, and library dependency usage philosophy to ensure consistency.
Changes Made