Consistent code formatting

Maintain consistent formatting and alignment throughout the codebase to improve readability and maintainability. This includes proper indentation for multi-line constructs, consistent spacing in documentation, and clear structural organization.

copy reviewer prompt

Prompt

Reviewer Prompt

Maintain consistent formatting and alignment throughout the codebase to improve readability and maintainability. This includes proper indentation for multi-line constructs, consistent spacing in documentation, and clear structural organization.

Key formatting practices:

  • Use consistent indentation for multi-line type intersections and complex structures
  • Align related elements properly for visual clarity
  • Format JSDoc comments with proper spacing and include relevant tags like @default
  • Prefer simpler conditional structures (separate if statements over else if chains when conditions are mutually exclusive)

Example of proper multi-line type formatting:

export type Styles = PaddingStyles &
	MarginStyles &
	FlexStyles &
	DimensionStyles &
	PositionStyles &
	WrapTextStyles;

Example of proper JSDoc formatting:

/**
 * Set this property to `hidden` to hide content overflowing the box.
 *
 * @default 'visible'
 */

This approach ensures code is visually consistent, easier to scan, and more maintainable across the entire codebase.

Source discussions