Me and a friend of mine are working on a codebase and a problem has arisen. So, I gladly adhere to any common style standard which has some tooling support for auto-format. My friend has harder to read code and strongly prefers things like functions in the following format
function foo()
{
console.log('bar');
}
This helps him to distinguish the beginning and end of blocks.
Compare to this format where the opening bracket is on the same line as the function keyword.
function foo() {
console.log('bar');
}
Is there any smooth way of enforcing a code style in the project while allowing a developer to view and seemingly add code in their preferred format? I've read about git hooks which I assume could be a part of formatting the code before commit. I cannot however find a full solution for the described scenario.