I always shut the fuel off and run mine dry.
Also keep an intelligent 'keeper' permantly hooked up.
My genny is an 'offshore' 9000 watt and I always watch TV and use my computer while on the genny and never any problems.
Also only use hi-test gas and full synthetic oils.
My take is that most modern electronics are low DC powered and some sort of transformer circuitry is used to convert to that DC and that in itself softens any pulses or wild spikes that damage components.
That said I experience many outages where I live (as many 'blips' as 15 over 24 hrs) and usually some 2-3 serious ones per month ranging from 3 hrs to 6-7 hrs.
Now I'm going on 9 years on my TV and about 7 on this laptop with no repairs needed.
Conveniently my generator sits outside in my lean to wood shed which is up against my concrete foundation so I don't even hear it running in the house.
While exhaust is thru a hole in the shed wall, I also installed a 12 inch 'muffin fan' to exhaust any carbon monoxide that occurs.
This home is well insulated and with the 9000 watt genny I can run 2-3 small ceramic heaters for the colder days until hydro is back up. Plus we have a slow combustion wood stove if needed (and the fireplace).
For cooking we use an induction hot plate and or the microwave oven.
For washing modern hot water tanks keep water usable to even shower for a few days.
Most important is running our septic and well pumps which are on dedicated circuits.
Life is good when U plan well for it.
Only downside is I need to be here to start the generator, but then being retired I mostly am.