Back to all reviewers

Avoid generic naming

calcom/cal.com
Based on 4 comments
TSX

Choose specific, descriptive names over generic ones for all identifiers including variables, functions, components, and test IDs. Generic names lack context and can cause confusion as the codebase grows. Names should clearly communicate their purpose and scope.

Naming Conventions TSX

Reviewer Prompt

Choose specific, descriptive names over generic ones for all identifiers including variables, functions, components, and test IDs. Generic names lack context and can cause confusion as the codebase grows. Names should clearly communicate their purpose and scope.

Examples of improvements:

  • reference_idtrace_reference_id (adds context about what type of reference)
  • aiaiPhone or calAiPhone (specifies the AI functionality)
  • 404-pageapp-router-not-found-page (indicates the specific context)
  • DeleteHistoryDialogDeleteBookingDialog (clarifies what is being deleted)

When naming identifiers, ask yourself: “Will another developer understand the purpose and scope of this identifier without additional context?” If not, make the name more specific and descriptive.

4
Comments Analyzed
TSX
Primary Language
Naming Conventions
Category

Source Discussions