Closet lights must maintain clearance from the back and side walls of 18" from the edge of the fixture to the back and side walls and also maintain 6" from the edge of the shelving storage area whether there is a shelf there or not for fluorescent fixtures and for recessed incandescent fixtures that have a closed lens.
Any surface mounted incandescent fixture must also have a
closed lens but these surface mounted incandescent light fixtures must maintain
24" from
the edge of the fixture to the back and side walls and also maintain 12" from
the edge of the shelving storage area whether there is a shelf there or not.
A
shelving area is minimum of floor to ceiling high and 12" wide from back
wall and from side wall to side wall of the closet.
The above clearance requirements are for clothes closets only. There is no clearance required from the front wall or header over the closet door. There is a 6" clearance required from an incandescent light bulb and any adjoining wall surface.
Please note: That in the above pictorial example it shows that the power supplied to the closet switch & light was obtained from an existing garage receptacle. The power source can be obtained from several locations including an existing inside outlet or an existing lighting fixture provided that an unswitched source of power can be obtained and both a hot , a neutral, and a ground can be obtained at that location to feed the new closet switch / light installation.
This picture also show that the source of power is coming to the switch first. It is possible to feed the source of power to the light first. To read about your options for basic switch / light wiring be sure to read the article at this link - BASIC LIGHT SWITCHThis document is based on the 1999 national electrical code and is designed to give you an option, as a self-help, that should pass minimum code requirements. While extreme care has been implemented in the preparation of this self-help document, the author and/or providers of this document assumes no responsibility for errors or omissions, nor is any liability assumed from the use of the information, contained in this document, by the author and / or provider.