Great question and hard problem.
I saw a project in which several technology leaders followed each other, each of whom brought their own principles of architecture and coding to new functions that were developed, but keeping the existing code intact. This led to a cluttered, fragmented code base, where each module was different from the others, which made all this very inconvenient to understand.
If you can reorganize the existing code in accordance with your new recommendations (and if the rest of the team is fine with this), you should absolutely do this.
Otherwise, simply adhere to existing coding rules if they do not create technical debt that will be uncontrollable in the future.
source share