According to the national code with relation to electrical panels in closets.
Electrical panel box in closet.
Rooms circuit breaker boxes may not be installed in bathrooms powder rooms clothes closets or in any room where there is insufficient space for a worker to access and work on the box.
In summary electrical panels can be located anywhere other than in bathrooms clothes closets above steps of a stairway or in fire rated partitions or area separation walls as long as the proper working clearances are provided per nec 110 26 and the enclosure type is suitable for the application i e.
These codes cover the installation and placement of residential circuit breaker boxes including main service panels and subpanels.
This section does not differentiate between one type of clothes closet or another.
However there are a few issues to consider a bout the language of this code and how it applies to your specific situation.
If clearance was kept i don t see a major issue as pictured.
If it is on the long wall of the closet all you need is a free 36 of space in front of it 30 in chicago no clothes in the closet for both scenarios.
With the electrical panel installed on the narrow side wall there might not be required 30 space unless you have a deep clothes closet.
According to section 240 24 d of the national electrical code nec which says overcurrent devices shall not be located in the vicinity of easily ignitable material such as in clothes closets you are not permitted to do this.
Rmeier2 robert meier april 16 2018 8 58pm 5.
Nec 240 24d overcurrent devices shall not be located in the vicinity of easily ignitable materials such as a clothes closet.
Panels are located in utility closets and approved all the time with proper clearances.