Company
Date Published
Author
Jon Ursenbach
Word count
854
Language
English
Hacker News points
None

Summary

ReadMe has addressed inconsistencies in coding styles within its rapidly growing engineering team by adopting Prettier, an opinionated code formatter, to complement their existing use of ESLint. The challenge was incorporating Prettier without overhauling the entire codebase at once. To achieve this, the team opted for a gradual adoption involving automation scripts that utilize Git commands to identify and format only changed files, which are then processed with Prettier. This approach ensures new code adheres to Prettier standards while gradually updating existing code. The team created a Bash script to facilitate this process, allowing them to check and migrate files to conform with Prettier standards, which is now integrated into their continuous integration builds to ensure consistency over time.