A shallow 5.4-magnitude earthquake hit off the east coast of Taiwan today, the US Geological Survey said, but there were no immediate reports of casualties or damage.