My response must have gone missing or disappeared in some other way, but here’s what I was saying:
This installation can’t be any older than 2000 or 2001. That is when they started color-coding NM cable jackets.
Also, the manufacture date is usually printed right on the sheath. I couldn’t make it out on the photo, but if in doubt, you can always find the date there, which should give you an idea of how recent certain wire run is.
334.15(B) is certainly older than the 1999 code cycle, probably much older.
My $0.02: Code issues aside, NM should not run exposed ANYWHERE, especially not in closets. NM offers virtually zero protection to its conductors.
The only acceptable place for it to be exposed, (again, in my very humble opinion) is between the joists in an unfinished basement.
And, not to sidetrack the thread, but I would not use NM in my own house if I could help it… I have very little confidence in it, having seen many issues with rodent damage, long siding nails, pulling damage, etc. etc.