This picture does not show a 'storage' space (shelf) above the hanger rod. 410.8(A).

As Joe has pointed-out, procelain (key or keyless) Lamp Holders are not Lighting Fixtures ( Luminaires ) and are not permitted in Clothes Closets (CC).

A side note;

In the typical 24" or even 30" deep closets, why do most electricians install the outlet in the center of the ceiling?
The light, in most cases, will be casting a shadow on the rear side of the closet where the light is most needed.

Why not install the outlet in the ceiling close to the door or in the wall just above the door?

The light will then cast a much-less shadow on the rear side of the closet.