Codebase Consistency

Mixed naming conventions across the project

infoAI Qualitycodebase-consistency

Why this matters

Different AI sessions use different conventions. One file uses camelCase, another uses snake_case. One uses default exports, another uses named. This makes the codebase feel disjointed and harder to navigate.

Bad
// utils/format_date.ts
export default function format_date(date_str: string) { ... }

// utils/formatCurrency.ts
export const formatCurrency = (amount: number) => { ... }

// utils/ParseInput.ts
export function ParseInput(raw: string) { ... }
Good
// utils/format-date.ts
export function formatDate(dateStr: string) { ... }

// utils/format-currency.ts
export function formatCurrency(amount: number) { ... }

// utils/parse-input.ts
export function parseInput(raw: string) { ... }

How to fix

Pick one convention for file names (kebab-case), function names (camelCase), and export style (named). Apply it consistently. Use ESLint naming rules to enforce it.

All rules