The simple answer is: yes, because they did. They didn't follow Moore's Law (which as Moore said was never actually correct, nor did he ever expect the trajectory to continue), but they existed, and the trend to miniaturisation certainly did continue until transistors took over.
People tend to forget that a clock is a mechanical computer. Early clocks were massive mechanical systems. As time went on (pun intended), machining abilities allowed people to shrink the size of clocks until it became possible to build pocket-sized watches. Chronometers followed the same trajectory - Harrison's original chronometer required a large wooden box, but his later chronometers were the size of large watches. Watch movement technology and winding mechanisms evolved over time, and became more miniaturised to the limits possible with machining and materials.
With watchmaking having firmly established how to construct minaturised mechanisms, mechanical computers were extensively developed and used throughout the first half of the 20th century. By WWII, most planes, warships and artillery used mechanical computers called "predictors" to improve accuracy, allowing for windage and (for aircraft and anti-aircraft guns) relative speeds.
These pure mechanical computers were still being surpassed by electro-mechanical computers though, which integrated banks of relays with mechanisms to rotate those banks of relays. Relays are mechanical systems with electrical power. Everything that transistor switches currently do can be done (albeit more slowly) by relays, and in fact early adoption of transistors was simply as drop-in replacements for relays in existing electro-mechanical computers. Had the transistor never been invented, it seems very likely that the direction of travel would have been the development of smaller and more reliable relays. (To digress, Terry Pratchett's novel Strata supposes this as part of the underlying mechanisms in Discworld.)
And then Diskworld. You may say "definitely no hard disks", but that's nonsense. A hard disk is a mechanical system with electrical power. Our current hard disks are a development of drum memory, which is more clearly a classical electro-mechanical system. Hard disks are actually one development which is almost inevitable and independent of electronics. They wouldn't be as good as what we currently have, sure, but they'd be around.
So in your electronics-free world, the end result would be increasing miniaturisation of relays and relay-based computers. Of course this could never approach the size of a transistor, but we might well have pocket calculators, fairly complex landline phone systems, and warehouse-sized computers of the kind that were available back in the 1960s. Moore's Law would probably stall there, in the same way as it has currently stalled for silicon.