Back to all reviewers

Follow naming conventions

apache/airflow
Based on 3 comments
TSX

Use proper naming conventions to make code more readable and maintainable: 1. **Functions should start with verbs** that describe their action: ```typescript

Naming Conventions TSX

Reviewer Prompt

Use proper naming conventions to make code more readable and maintainable:

  1. Functions should start with verbs that describe their action:
    // Incorrect
    const hasChanges = () => { ... }
       
    // Correct
    const checkForChanges = () => { ... }
    
  2. Use descriptive names for generated outputs that include relevant context:
    // Too generic
    element.download = `taskInstanceLogs.txt`;
       
    // Better - includes relevant identifiers
    element.download = `${dagId}-${taskId}-${runId}-${mapIndex}-${tryNumber}.txt`;
    
  3. Maintain consistent casing for related identifiers, especially when filtering or comparing:
    // Define consistent casing pattern for categories
    const existingCategories = ["user", "docs", "admin", "browse"];
       
    // Use consistent transformation when comparing
    if (!existingCategories.includes(category.toLowerCase())) {
      // ...
    }
    

Following these conventions improves code clarity and reduces confusion when maintaining code across a team.

3
Comments Analyzed
TSX
Primary Language
Naming Conventions
Category

Source Discussions