If you dub your closet a "utility" closet (and not put anything combustable in there...) then you may...

But if you intend to use it as a clothes closet, you may not.
Quote

240-24(d) Not in Vicinity of Easily Ignited Material. Overcurrent devices shall not be located in the vicinity of easily ignited material, such as in clothes closets.

[Linked Image from kellyelectric.electrical-contractor.net]


-Virgil
Residential/Commercial Inspector
5 Star Inspections
Member IAEI