Follow systematic naming conventions for types, interfaces, and functions to enhance code readability and navigability:
*Data: Full API models with id, type, attributes, relationships (e.g., RoleData)*Attributes: Only the attributes section of an object (e.g., RoleAttributes)*Props: React component props (e.g., UserInfoProps)*FormValues, *Params: Form schemas or context-specific helper typesget, create)getLatestFindings not getFindingsLatest)// โ Avoid
interface Role { id: string; type: "roles"; attributes: { /* ... */ }; }
const getFindingsLatest = async () => { /* ... */ };
type CredentialsForm = { aws_access_key_id: string; /* string literals */ };
// โ
Better
interface RoleData { id: string; type: "roles"; attributes: RoleAttributes; }
interface RoleAttributes { /* ... */ }
const getLatestFindings = async () => { /* ... */ };
enum CredentialKeys { AwsAccessKey = "aws_access_key_id" /* ... */ }
This systematic naming makes the code more self-documenting and helps developers quickly distinguish between different types of interfaces when reading or searching through the codebase.
Enter the URL of a public GitHub repository