Be consistent
Format all code of a project in the same way. Let all team members use the same formatting style.
If you edit foreign code, adhere to that project’s formatting style instead of insisting on your personal style.
If you change your formatting rules over time, use refactoring best practices to update your code over time.