Code Violation or a Nothing Issue?
Take a pendant light that hangs at a level where you can touch it. It comes ready to hardwire into a ceiling box.
Cut off the wires that come on it, including the ground. Substitute a length of extension cord. Attach a plug to the end. Plug this into a socket adaptor. Screw the socket adaptor into a lightbulb socket on a ventilation fan.
Would this pass inspection?
Is UL approval voided?
Do light fixtures need UL approval or is this a locally decided thing?