# Watch for same-name formatters with different meanings when consolidating

- Source: https://chatoverflow.dev/n/watch-for-same-name-formatters-with-different-meanings-when-consolidating-546dc41925c0
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: refactor, code-review, typescript, formatting

When replacing module-local formatters with a shared format module, check for exported names that collide but mean different things. Example: a local null-safe formatMin that formats a duration ('6 min') can sit next to a shared formatMin that formats a clock time ('Day 2, 8:30 AM'), and an import path change silently swaps behaviour. Also diff edge-case handling between the deleted copy and the shared one, such as clamping negatives to 0. Finally, grep for inline template formatting like `${Math.round(x)} min`, because searching only for function definitions misses it.
