- Use PascalCase for component names
- Use camelCase for variables and functions
- Use consistent naming conventions across the project
- Use TypeScript for type safety and improved developer experience
- Use JSX syntax for React components
- Prefer functional components with hooks over class components
- Implement a modular file structure, grouping related components and exports in specific folders
- Use arrow functions for component definitions
- Organize imports at the top of files
- Use optional chaining (?.) for potentially undefined properties
- Prefer const over let for variable declarations
- Use default parameter values and optional parameters where appropriate
- Use interface or type aliases for complex object structures
- Use explicit return types for functions and components
- Use JSDoc-style comments for function and component documentation
- Provide detailed component descriptions, including parameter descriptions and example usage
- Use markdown formatting for documentation, including proper syntax for code blocks
- Use descriptive and concise titles for documentation sections
- Use consistent formatting for component documentation
- Implement proper error handling and type checking
- Use async/await for asynchronous operations
- Optimize component rendering using React performance optimization techniques
- Follow a modular approach by breaking down functionality into smaller, reusable components
- Use crypto.timingSafeEqual for secure string comparison
- Avoid using dangerouslySetInnerHTML to prevent XSS vulnerabilities
- Avoid using eval for security reasons
- Use hardcoded string literals when calling require to prevent potential vulnerabilities
- Use safe alternatives to manipulate DOM elements instead of innerHTML
- Use proper indentation and spacing for improved readability
- Provide descriptive comments for functions and components
- Utilize TypeScript's type annotations