Second hand code citing is FRUSTRATING. If you know something is against code, cite the source and include a quote. Stop the propagation of bad information.
I agree with you on switches in the closet, it's a custom, and often a stupid one. My pantry switch is on the outside on the hinged side of the door, quite inconvenient. I saw an instructable where a guy had rope lights triggered by the door opening - I have most of the materials, just need to find the time!
@SteveJackson It's fine when people say something is code, if they know it's code. It's a problem when somebody told them something that was false, and they repeat it as fact. Check your facts!
I can't find anything that prohibits receptacles in closets either.
As a matter of fact, check out 210.12 Arc-Fault Circuit-Interrupter Protection.
(B) Dwelling Units. All 120-volt, single phase, 15- and 20-ampere branch circuits supplying outlets installed in dwelling unit family rooms, dining rooms, living rooms, parlors, libraries, dens, bedrooms, sunrooms, recreation rooms, closets, hallways, or similar rooms or areas shall be protected by a listed arc-fault circuit interrupter, combination-type, installed to provide protection of the branch circuit
Yeah, I mean it's funny because there are obviously closets where you would have a receptacle (a laundry closet). Additionally I have receptacles in my room-sized closet, it passed inspection.
But I can see the fire concern in a simple coat closet.
@Tester101 Well, I guess I mean if a zipper or something was pressed into it. Or since closets are well packed, under-ventilated, and hidden from sight, there's potential to plug a heavy transformer in and overheat it.
I'm obviously grasping a little here, I really don't know.
@SteveJackson I guess I can see some concern, but since they have to be arc fault protected and tamper resistant (as of NEC 2011). Maybe those concerns are no longer valid?
@Tester101 That's interesting. It's rare that code changes allow new things, but maybe. I also think it's worth noting that many electricians will say they can't do something when they mean they don't want to do it.
Did some research @Tester101, pretty sure you're right. NEC doesn't say, local regs might. I saw 110.18 mentioned on one site, but that looks like complete bull. However in Ontario, they're usually prohibited unless special purpose.
And the primary concern appears to be that the closet door could damage the cord.