Global Instructions
Purpose: Define overarching coding standards and preferences applicable across all projects.
Functionality: Set guidelines that the AI follows universally, maintaining consistency in code quality and style.
Usage: Ideal for enforcing company-wide coding conventions & for personal coding habits too.
How to Use :
Examples:
Naming Conventions:
Instruction: Use camelCase for variable and function names, and PascalCase for class names.
Benefit: Ensures consistent and readable naming throughout your codebase.
Standardize Error Handling Mechanisms:
Instruction: Use try-catch blocks for exception handling in asynchronous functions and ensure all errors are logged with relevant context.
Benefit: Promotes robust error management and simplifies debugging processes.
Commenting Practices:
Instruction: Write JSDoc comments for all public functions and classes.
Benefit: Improves code documentation and aids in generating API documentation.
Import Order:
Instruction: Organize imports alphabetically, with external libraries first, followed by internal modules.
Benefit: Enhances readability and maintainability of import statements.
Implement Comprehensive Commenting Practices:
Instruction: Write clear and concise comments for all complex code blocks, including function descriptions, parameter explanations, and return value details.
Benefit: Improves code maintainability and aids team members in understanding intricate logic.
Last updated