There’s no canon answer - though we can make logical guesses.
Nowhere in the HP universe addresses what happens to werewolves during a lunar eclipse. While we know what takes place during a lunar eclipse in the scientific sense, it’s possible there’s some magical effect of a lunar eclipse that changes how a werewolf transformation works for that month. There’s no way to know for certain, but we can make some logical guesses based on science.
If it’s caused by the moon phase, not moonlight, he’d probably still turn.
In the event of a lunar eclipse, the phase of the moon would still be considered “full”. If it’s the phase that causes the transformation, then it’s unlikely Lupin (or any other werewolf) could avoid transforming, since the moon would still be full, though hidden from view.
The werewolf transformation being caused by the phase of the moon, rather than the moonlight each night, seems the most likely. Despite shutting himself in the Shrieking Shack, Lupin still transformed into a werewolf when he likely wasn’t in contact with moonlight. In addition, it seems to last for day and night until the phase of the moon is no longer full. Lupin mentions disappearing once a month, but it isn't clear whether his absence during the day is because he's still transformed into a werewolf, or because having transformed the night before left him feeling weak and needing to rest.
What little evidence there is seems to imply that the transformation lasts, night and day, until the moon wanes again.
“As long as I take it in the week preceding the full moon, I keep my mind when I transform … I am able to curl up in my office, a harmless wolf, and wait for the moon to wane again.”
- Harry Potter and the Prisoner of Azkaban, Chapter 18 (Moony, Wormtail, Padfoot and Prongs)
In addition, every time Lupin or someone else refers to his transformation, they say it's "once a month", not "nightly", and there doesn't seem to be any evidence he turns back human during the day. He never mentioned doing anything as a human during the day when the moon is full, even in a weakened state.
Even if moonlight is the cause, it would likely just delay transformation.
A total eclipse doesn’t last the entire night, and the part of an eclipse where the moon is entirely covered by the Earth’s shadow (called totality) is only a percentage of that time. Once the lunar eclipse is done, the full moon is out as normal. Then, there are still two other days when there’s a full moon and no eclipse that same month.