Is it legal to put an electric outlet on a circuit that feeds smoke detectors (which have batteries for power outages)? I was asked to do so for a neighbour who removed one of the detectors since there was another around the corner, about 3' away, and he needed an extra outlet.

Any thoughts?