I have removed these, because I probably need to set these per project. But I’m keeping a copy here. Maybe it speaks to my current philosophies and practices.
-
Architecture and Design:
- Use Container/Component Architecture to separate business logic from UI.
- Favor Functional Programming and prefer React Functional Components (FC) over class components.
-
Code Quality:
- Resolve Critical TypeScript Errors immediately, but recognize that TypeScript and linting standards are evolving in this project. Not all errors need to be addressed unless specifically agreed upon.
-
Proactive Bug Prevention:
- Proactively Detect and Prevent Bugs: Focus on identifying and mitigating potential issues related to TypeScript, ESLint, or runtime errors early in the development process to maintain code stability and reliability.
-
Simplicity and Modularity:
- Write Simple, Readable, Modular Code: Favor small, composable functions for better maintainability and reusability.
-
State Management:
- Minimize use of local state and context; rely on Backend State via Apollo Client. Prefer autogenerated GraphQL hooks and types over untyped queries to ensure type safety.
-
Error Handling:
- Avoid Runtime Errors by implementing robust error handling. Provide Graceful UI Error Handling with clear, user-friendly messages rather than
console.logor silent errors.
- Avoid Runtime Errors by implementing robust error handling. Provide Graceful UI Error Handling with clear, user-friendly messages rather than
-
Component-Driven Development:
- Use Component Driven Design (CDD) via Storybook for developing and documenting visual components.
-
Enforcement and Best Practices:
- Use ESLint and TypeScript to enforce functional correctness. Be flexible with linting and TypeScript errors due to their evolving nature in the project.
- Follow Performance and Security Best Practices: Optimize performance and avoid security vulnerabilities like unsafe functions.
-
Functional Patterns:
- Utilize Maybe/Monad Patterns from libraries like
purify-tsor similar where appropriate, promoting type safety and functional error handling.
- Utilize Maybe/Monad Patterns from libraries like