I'm selling my house. Basement has a pool table which will stay with the house. I installed a shop light (2x4' fluorescent tubes) over the table, suspended by chains. I hard wired the lamp, removing the original line cord & running the 14/2 into the lamp housing using one of those metal fittings that clamps the cable (removed the original strain relief, enlarged the hole & screwed in the fitting). Lamp is controlled by a nearby wall switch. After looking at the damned thing hanging by the chains, it occurs to me that, since the light can swing a bit if someone pushes on it, it may not be code to run the 14/2 right into the lamp; maybe I should have wired an outlet box on the ceiling (open joists, actually) next to where the lamp will hang and then plug the original line cord into this, as you see sometimes with garage door openers. If it weren't for the fact that I'm selling the house (ie, if I were staying here) & don't want some inspector to have a conniption over the wire, I'd just leave it. Works fine, electrically fine, other than the possible (though unlikely) problem of movement of non-stranded wire. Distance from the joist where the 14/2 is stapled to the lamp is about 14". Anyone know if the direct wired setup is a code problem, and if so should I just replace the line cord then wire a box to plug the thing into?
Thanks,
David