Use consistent case styles in your codebase, adapting to the conventions of the ecosystem you're interacting with. When working with systems that use snake_case (like many Python-based backends, databases, or MCP servers), maintain that convention in your interfaces to those systems.
Use consistent case styles in your codebase, adapting to the conventions of the ecosystem you’re interacting with. When working with systems that use snake_case (like many Python-based backends, databases, or MCP servers), maintain that convention in your interfaces to those systems.
Benefits:
Example:
// Good: Using snake_case for fields that interface with a snake_case system
const logFields = {
log_type: 'postgres',
event_message: message,
api_role: role
};
// Not recommended: Mixing conventions when interfacing with snake_case systems
const logFields = {
logType: 'postgres', // camelCase
event_message: message, // snake_case
apiRole: role // camelCase
};
For new components, consider the primary systems they’ll interact with and adopt the prevailing convention. Document your case style decisions in your team’s style guide to maintain consistency.
Enter the URL of a public GitHub repository