It’s a balancing act. Sometimes writing code compactly makes it harder to follow, and that’s when it becomes counterproductive. However, writing code that’s too long or too broken up with small methods can make it difficult to get the overall picture.
I see both perfectly readable, but you should always follow the rules of your enviroment, then your own, then you can follow the warnings.